From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: guix-devel@gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [PATCH v2] .dir-locals.el: Automatically set the GEISER-GUILE-LOAD-PATH variable.
Date: Mon, 26 Oct 2020 01:53:16 -0400 [thread overview]
Message-ID: <20201026055316.25592-1-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <87o8kqowa5.fsf@gmail.com>
* .dir-locals.el: Set the GUIX-DIRECTORY and GEISER-GUILE-LOAD-PATH Emacs
variables based on the location of the .dir-locals file.
---
.dir-locals.el | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index 19f15b3e1a..68df95a6d5 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -8,7 +8,26 @@
;; For use with 'bug-reference-prog-mode'.
(bug-reference-url-format . "http://bugs.gnu.org/%s")
(bug-reference-bug-regexp
- . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")))
+ . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>")
+
+ ;; 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).
+ (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* (directory-file-name root-dir)))
+ (unless (fboundp 'geiser-guile-load-path)
+ (defvar geiser-guile-load-path '()))
+ (make-local-variable 'geiser-guile-load-path)
+ (cl-pushnew root-dir* geiser-guile-load-path
+ :test #'string-equal)))))
+
(c-mode . ((c-file-style . "gnu")))
(scheme-mode
.
--
2.28.0
next prev parent reply other threads:[~2020-10-26 5:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-25 18:08 [PATCH] Automatically set `geiser-guile-load-path' from .dir-locals Maxim Cournoyer
2020-10-25 18:13 ` Pierre Neidhardt
2020-10-25 18:42 ` [PATCH] .dir-locals.el: Automatically set the GEISER-GUILE-LOAD-PATH variable Maxim Cournoyer
2020-10-25 18:52 ` Pierre Neidhardt
2020-10-25 21:37 ` Maxim Cournoyer
2020-10-25 21:01 ` Miguel Ángel Arruga Vivas
2020-10-26 5:47 ` Maxim Cournoyer
2020-10-26 5:53 ` Maxim Cournoyer [this message]
2020-10-26 7:56 ` [PATCH v2] " Pierre Neidhardt
2020-10-26 11:38 ` Miguel Ángel Arruga Vivas
2020-10-27 16:53 ` Maxim Cournoyer
2020-10-27 18:58 ` Miguel Ángel Arruga Vivas
2020-10-27 17:44 ` [PATCH v3] " Maxim Cournoyer
2020-10-31 4:19 ` Maxim Cournoyer
2020-11-01 1:02 ` Miguel Ángel Arruga Vivas
2020-10-26 13:43 ` [PATCH] Automatically set `geiser-guile-load-path' from .dir-locals zimoun
2020-10-26 15:03 ` Pierre Neidhardt
2020-11-05 2:20 ` Christopher Lemmer Webber
2020-11-05 4:00 ` Christopher Lemmer Webber
2020-11-05 9:25 ` Miguel Ángel Arruga Vivas
2020-11-05 17:26 ` Christopher Lemmer Webber
2020-11-14 19:57 ` Christopher Lemmer Webber
2020-11-16 4:18 ` Maxim Cournoyer
2020-11-16 14:54 ` Miguel Ángel Arruga Vivas
2020-11-16 17:41 ` Christopher Lemmer Webber
2020-11-16 18:07 ` Christopher Lemmer Webber
2020-11-16 20:57 ` Miguel Ángel Arruga Vivas
2020-11-16 23:09 ` Christopher Lemmer Webber
2020-11-17 15:36 ` Maxim Cournoyer
2020-11-18 10:12 ` Miguel Ángel Arruga Vivas
2020-11-05 14:21 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201026055316.25592-1-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.