How can I modify list of directories which are omitted by default in rgrep command?

When use C-u rgrep I can see list of directories to skip (mostly version control dirs), but I'd like to add venv and node_modules to this list. There is a similar question about FILES and grep-files-aliases variable (see rgrep default files pattern), but I could not find anything similar about DIRs.

1 Answer 1


It is explained (near the end) in the section Searching with Grep under Emacs in the Emacs manual.

It can be configured via the grep-find-ignored-directories variable (which inherits its default value from vc-directory-exclusion-list).

You can add directories via the customize interface (M-x customize-variable grep-find-ignored-directories) or use add-to-list to add extra directories to grep-find-ignored-directories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.