From d7075b24205ad4e85f1855c23d7efa47878fa7f4 Mon Sep 17 00:00:00 2001 From: 132ikl <132@ikl.sh> Date: Sat, 6 Jul 2024 20:16:59 -0400 Subject: [PATCH] tweak(lib): doom-project-find-file: use transient project If DIR is not a project and does not have root markers, create a transient project instead. This ensures that `project-find-file-in`, and by extension vertico, is still used in non-project directories instead of falling back to `find-file` Ref: 1b0af3bfc747 --- lisp/lib/projects.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/lib/projects.el b/lisp/lib/projects.el index a1655f314..16c592e65 100644 --- a/lisp/lib/projects.el +++ b/lisp/lib/projects.el @@ -152,11 +152,12 @@ If DIR is not a project, it will be indexed (but not cached)." ((and (bound-and-true-p ivy-mode) (fboundp 'counsel-file-jump)) (call-interactively #'counsel-file-jump)) - ((when-let ((pr (project-current nil dir))) - (project-find-file-in nil nil pr))) ((and (bound-and-true-p helm-mode) (fboundp 'helm-find-files)) (call-interactively #'helm-find-files)) + ((when-let ((project-current-directory-override t) + (pr (project-current t dir))) + (project-find-file-in nil nil pr))) ((call-interactively #'find-file))))) ;;;###autoload