Hi! I think that geiser should use something (project.el, wink wink) to fill load-path automatically when that's possible. Nevertheless, I have some comments for this. Maxim Cournoyer writes: > + > + ;; Emacs-Guix > + (eval . (setq guix-directory > + (locate-dominating-file default-directory ".dir-locals.el"))) > + > + ;; Geiser > + ;; This allows automatically setting the `geiser-guile-load-path' > + ;; variable when using various Guix checkouts (e.g., via git worktrees). > + ;; The checkout root directory name should be prefixed by "guix" for it > + ;; to work correctly. > + (eval . (let* ((root-dir (expand-file-name > + (locate-dominating-file > + default-directory ".dir-locals.el"))) > + ;; Workaround for bug https://issues.guix.gnu.org/43818. > + (root-dir* (if (string-suffix-p "/" root-dir) > + (substring root-dir 0 -1) > + root-dir)) This is already implemented by directory-file-name. > + (clean-geiser-guile-load-path > + (seq-remove (lambda (x) > + (string-match "/guix" x)) > + geiser-guile-load-path))) This fails if geiser-guile-load-path does not exist (void-variable). The cleanup removes other guixes, isn't it? I suggest making the variable buffer-local and forget about hard-coded names. :-) > + (setq geiser-guile-load-path > + (cons root-dir* clean-geiser-guile-load-path)))))) This becomes a push with a local variable. Like this: -------------------------------8<------------------------------------- (eval . (setq guix-directory (locate-dominating-file default-directory ".dir-locals.el"))) (eval . (when (boundp 'geiser-guile-load-path) (make-local-variable 'geiser-guile-load-path) (push (directory-file-name (expand-file-name (locate-dominating-file default-directory ".dir-locals.el"))) geiser-guile-load-path)) ------------------------------->8------------------------------------- Happy hacking! Miguel