THX1137
THX1137

Reputation: 973

How Do I Grep All Files In A Non-Project Directory With Projectile?

My root project folder is not a project in Projectile, but I often want to search all my projects for a string to see where I've used or defined a given function before. How do I search the contents of all my projects recursively in Emacs? I realize Projectile may not be the best approach, and I'm also curious about others. However, as things stand, Projectile prompts me for a specific project, as opposed to a parent parent directory.

Upvotes: 1

Views: 226

Answers (2)

Rorschach
Rorschach

Reputation: 32446

You can use the builtin M-xrgrep function to recursively search for a regex in your directory tree.

Upvotes: 2

Svante
Svante

Reputation: 51531

I'd just use the silver searcher (ag), which has wrapper packages in Emacs, e. g. helm-ag.

Upvotes: 1

Related Questions