Project based searching within Emacs can be done using projectile.
It allows for per-project configuration of ignore files (in a <projectroot>\.projectile
file), or specify subdirectories to monitor and ignore all others.
It can run grep
, ack
(requires ack-and-a-half.el
) and ag
(ag.el
) on files within the defined project (either based on the .projectile
file or by finding a supported VC file to define a project root).
Useful Commands
(With regards to searching through useful files)
As per Projectile Readme
C-c p s g
:: Rungrep
on the files in the project.C-c p s a
:: Runsack
on the project. Requires the presence of ack-and-a-half.C-c p s s
:: Runsag
on the project. Requires the presence of ag.el.C-c p f
:: Display a list of all files in the project.C-c p d
:: Display a list of all directories in the project.C-c p a
:: Switch between files with the same name but different extension in the project.C-c p o
:: Runsmulti-occur
on all project buffers currently open.
These will only act on files defined as being part of the project (or found when the cache is generated/regenerated).