tags:

views:

59

answers:

2

I would like to search files (either all of them or matching a pattern) in a directory and it's subdirectories for a certain string. What I usually do in emacs is find-name-dired to list the files and search them, but that also searches all the .svn directories which is wasteful and makes it really slow for large projects. Is there a way to skip .svn directories?

Thanks,

+2  A: 

Sounds like you should be using grep in emacs. With grep, you can search for strings in files, and if you use this guy's mod grep will ignore .svn directories.

zdav
This is great, thanks!
jondro
+1  A: 

I think rgrep ignores .svn outta the box.

offby1
It sure does, along with file name patterns matching many other version control systems, so it does what you want in most situations (but if you do need to tweak it, you get a chance to edit the generated command line before it executes if you call it with `C-u M-x rgrep`).
phils