fix: recursive load errors on lib/projects.el
A change upstream was causing recursive load errors. I'm not too clear how it happens, as I can't reproduce it, but bbatsov/projectile@3c92d28c05 is the common thread (bumped inc1b5f48
). Rather than revert the bump, I've just undone the hook and used a saner hook for the same task. It is a stopgap solution until I eventually replace projectile with project.el. Ref: bbatsov/projectile@3c92d28c05 Amend:c1b5f48f07
This commit is contained in:
parent
c1b5f48f07
commit
83fedf1fff
1 changed files with 12 additions and 8 deletions
|
@ -68,13 +68,6 @@ Is nil if no executable is found in your PATH during startup.")
|
||||||
(global-set-key [remap find-tag] #'projectile-find-tag)
|
(global-set-key [remap find-tag] #'projectile-find-tag)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
;; HACK: Projectile cleans up the known projects list at startup. If this list
|
|
||||||
;; contains tramp paths, the `file-remote-p' calls will pull in tramp via
|
|
||||||
;; its `file-name-handler-alist' entry, which is expensive. Since Doom
|
|
||||||
;; already cleans up the project list on kill-emacs-hook, it's simplest to
|
|
||||||
;; inhibit this cleanup process at startup (see bbatsov/projectile#1649).
|
|
||||||
(letf! ((#'projectile--cleanup-known-projects #'ignore))
|
|
||||||
(projectile-mode +1))
|
|
||||||
;; HACK: Auto-discovery and cleanup on `projectile-mode' is slow and
|
;; HACK: Auto-discovery and cleanup on `projectile-mode' is slow and
|
||||||
;; premature. Let's try to defer it until it's needed.
|
;; premature. Let's try to defer it until it's needed.
|
||||||
(add-transient-hook! 'projectile-relevant-known-projects
|
(add-transient-hook! 'projectile-relevant-known-projects
|
||||||
|
@ -246,7 +239,18 @@ when using many of projectile's command, e.g. `projectile-compile-command',
|
||||||
This suppresses the error so these commands will still run, but prompt you for
|
This suppresses the error so these commands will still run, but prompt you for
|
||||||
the command instead."
|
the command instead."
|
||||||
:around #'projectile-default-generic-command
|
:around #'projectile-default-generic-command
|
||||||
(ignore-errors (apply fn args))))
|
(ignore-errors (apply fn args)))
|
||||||
|
|
||||||
|
;; HACK: Projectile cleans up the known projects list at startup. If this list
|
||||||
|
;; contains tramp paths, the `file-remote-p' calls will pull in tramp via
|
||||||
|
;; its `file-name-handler-alist' entry, which is expensive. Since Doom
|
||||||
|
;; already cleans up the project list on kill-emacs-hook, it's simplest to
|
||||||
|
;; inhibit this cleanup process at startup (see bbatsov/projectile#1649).
|
||||||
|
(letf! ((#'projectile--cleanup-known-projects #'ignore))
|
||||||
|
(projectile-mode +1)
|
||||||
|
;; HACK: See bbatsov/projectile@3c92d28c056c
|
||||||
|
(remove-hook 'buffer-list-update-hook #'projectile-track-known-projects-find-file-hook)
|
||||||
|
(add-hook 'doom-switch-buffer-hook #'projectile-track-known-projects-find-file-hook t)))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue