embark : need to check if project first

This commit is contained in:
bth 2024-08-22 22:21:35 -07:00
commit 96181e9229

View file

@ -126,6 +126,7 @@ Since journal/ is the origin and other projects shadow it.
;; NOTE: Recurse down into current project directories. ;; NOTE: Recurse down into current project directories.
;; project-find-file does it fine, just don't want interactive ;; project-find-file does it fine, just don't want interactive
;; completing-read call. ;; completing-read call.
(when (project-current)
(let ((result) (tap (thing-at-point 'filename t))) (let ((result) (tap (thing-at-point 'filename t)))
;; TODO: this is procedural thinking and not lisp-like: ;; TODO: this is procedural thinking and not lisp-like:
(cl-loop for file in (cl-loop for file in
@ -135,7 +136,7 @@ Since journal/ is the origin and other projects shadow it.
if result if result
;; see `embark-target-finders': ;; see `embark-target-finders':
return (cons 'file file) return (cons 'file file)
)) )))
;; all other projects ;; all other projects
(let ((result)) (let ((result))