I guess given that I see file metadata in marginalia correctly, project-find-file-in
does call find-file with appropriate dynamic binding for default-directory
, so I suspect the way embark works (or due to other stuffs, perhaps /u/oantolin can explain), it cannot continue from that scope, so by the time embark starts the old dynamic scope has already been unwound?
Anyway, you can just wrap that function call with your own binding that covers embark:
(defun find-file-in-project (&optional dir)
(interactive)
(when-let* ((project (project-current nil dir))
(default-directory (project-root project)))
(project-find-file-in nil nil project)))
When is the next Brazil - Argentina game? I need to mark this on calendar. I am sure the 5 minutes of actual football that will happen will be glorious.