branch: elpa/projectile
commit 4dd84b02c9cd7b04616dc2d01ba7bc87f0d15be8
Author: Bozhidar Batsov <bozhi...@batsov.dev>
Commit: Bozhidar Batsov <bozhi...@batsov.dev>

    Set `projectile-auto-discover` to `nil` by default
    
    That's a safer default, given the changes to its behavior in 2.9.
---
 CHANGELOG.md                      |  4 ++++
 doc/modules/ROOT/pages/usage.adoc | 14 +++++++++++---
 projectile.el                     |  2 +-
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5487dbcc65..26c9a06606 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 ## master (unreleased)
 
+### Changes
+
+* Set `projectile-auto-discover` to `nil` by default.
+
 ## 2.9.1 (2025-02-13)
 
 ### Bugs Fixed
diff --git a/doc/modules/ROOT/pages/usage.adoc 
b/doc/modules/ROOT/pages/usage.adoc
index 9d607556f4..d1d1dedbc0 100644
--- a/doc/modules/ROOT/pages/usage.adoc
+++ b/doc/modules/ROOT/pages/usage.adoc
@@ -66,9 +66,17 @@ Recursive discovery is configured by specifying the search 
depth in a cons cell:
 (setq projectile-project-search-path '("~/projects/" "~/work/" ("~/github" . 
1)))
 ----
 
-You can suppress the auto-discovery of projects on startup by setting
-`projectile-auto-discover` to `nil`. You can manually trigger the project
-discovery using `M-x projectile-discover-projects-in-search-path`.
+You can manually trigger the project
+discovery using `M-x projectile-discover-projects-in-search-path` or you can
+use `projectile-auto-discover` to discover projects on the search path 
automatically:
+
+[source,elisp]
+----
+(setq projectile-auto-discover t)
+----
+
+NOTE: Keep in mind the auto-discovery will be triggered every time you switch 
projects,
+so it's probably not a good idea if you have many projects on your search path.
 
 === Removal of missing projects
 
diff --git a/projectile.el b/projectile.el
index 78c915ccad..40f3ddb167 100644
--- a/projectile.el
+++ b/projectile.el
@@ -191,7 +191,7 @@ A value of nil means the cache never expires."
   :type '(choice (const :tag "Disabled" nil)
                  (integer :tag "Seconds")))
 
-(defcustom projectile-auto-discover t
+(defcustom projectile-auto-discover nil
   "Whether to discover projects when project switching commands are invoked.
 
 See also `projectile-project-search-path'."

Reply via email to