Add a custom setting to control automatic project discovery #1539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a custom setting
projectile-auto-discover
that controls whether to automatically runprojectile-discover-projects-in-search-path
when Projectile mode is activated.The main purpose is to enable faster Emacs startup when starting
projectile-mode
automatically from the init file. On my system (~2015 i5, Emacs 27, Linux, with 140 project directories) turning off auto-discovery improves startup time by around 1.7 seconds.The default setting for
projectile-auto-discover
leaves current behavior unchanged.One already has to manually run one of the
projectile-discover-*
commands to update project bookmarks during an Emacs session, so it seems reasonable to allow the user to choose to always use manual updating rather than forcing an update every time they start Emacs or turn on the mode. Since project bookmarks are cached and loaded from disk, it's usually not necessary to update them anyway.The following tests are failing on master on my machine so I don't think the failures are related to my changes. All other tests are passing.
"projectile-grep multi-root grep grep multi-root projects"
"projectile-compilation-dir should not fail on bad compilation dir config"
Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
make test
)M-x checkdoc
warningsThanks!