I'm missing an option variable similar to vc-directory-exclusion-list that holds of a list of auto-generated directory names that contain temporary files that are typically but not exlusively created by build tools.

For instance the D official build tool dub creates a directory .dub storing generated code and binary artifacts.

I could add .dub to the vc-directory-exclusion-list for now but I have the feeling I might run into trouble doing so.

Two named contenders of such a variable could be either

  • temporary-directory-exclusion-list or
  • generated-directory-exclusion-list


Alternatively project.el could be extended with a variable similar to


but I'm not sure this feature should be restricted to projects only.

1 Answer 1


If you're talking about project.el and its built-in VC-based backend, have you tried customizing project-vc-ignores?

You can change its global value, or you can put different (per-project) values inside corresponding .dir-locals.el files.

And if you wanted to see it affect non-project related commands, you could try to give more examples of such.

Also see grep-find-ignored-directories and its definition.

  • I was primarily interested in a setting that affected non-project/vc logic aswell. And I think generalizing vc-directory-exclusion-list is the right solution there. But this solves my issue right now, thanks.
    – Nordlöw
    Jun 14, 2022 at 9:26

Your Answer

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

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