diff --git a/lisp/lib/projects.el b/lisp/lib/projects.el index ffd2aa9b1..91f528e12 100644 --- a/lisp/lib/projects.el +++ b/lisp/lib/projects.el @@ -155,8 +155,8 @@ 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)) - ((project-current nil dir) - (project-find-file-in nil nil dir)) + ((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))