GNU bug report logs - #73253
[PATCH] .dir-locals.el: Add tempel snippets.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Sat, 14 Sep 2024 14:48:02 UTC

Severity: normal

Tags: patch

Done: "jgart" <jgart <at> dismail.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73253 in the body.
You can then email your comments to 73253 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#73253; Package guix-patches. (Sat, 14 Sep 2024 14:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 14 Sep 2024 14:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] .dir-locals.el: Add tempel snippets.
Date: Sat, 14 Sep 2024 16:47:16 +0200
Change-Id: Ic16f571f26fffee12e478e00c54be55e6eb90831
---
 .dir-locals.el                                    | 15 +++++++++++++++
 .../tempel/{scheme-mode => scheme-mode.eld}       |  2 --
 etc/snippets/tempel/{text-mode => text-mode.eld}  |  2 --
 3 files changed, 15 insertions(+), 4 deletions(-)
 rename etc/snippets/tempel/{scheme-mode => scheme-mode.eld} (98%)
 rename etc/snippets/tempel/{text-mode => text-mode.eld} (99%)

diff --git a/.dir-locals.el b/.dir-locals.el
index d0c25b867b..201ebd4198 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -19,6 +19,21 @@
                          (locate-dominating-file default-directory
                                                  ".dir-locals.el")))
 
+     ;; TempEl
+     (eval . (with-eval-after-load
+                 'tempel
+               (if (stringp tempel-path)
+                   (setq tempel-path (list tempel-path)))
+               (let ((guix-tempel-snippets
+                      (concat
+                       (expand-file-name
+                        "etc/snippets/tempel"
+                        (locate-dominating-file default-directory
+                                                ".dir-locals.el"))
+                       "/*.eld")))
+                 (unless (member guix-tempel-snippets tempel-path)
+                   (add-to-list 'tempel-path guix-tempel-snippets)))))
+
      ;; YASnippet
      (eval . (with-eval-after-load
                  'yasnippet
diff --git a/etc/snippets/tempel/scheme-mode b/etc/snippets/tempel/scheme-mode.eld
similarity index 98%
rename from etc/snippets/tempel/scheme-mode
rename to etc/snippets/tempel/scheme-mode.eld
index 249f4ce8e3..21a5dd6dee 100644
--- a/etc/snippets/tempel/scheme-mode
+++ b/etc/snippets/tempel/scheme-mode.eld
@@ -1,5 +1,3 @@
--*- mode: lisp-data -*-
-
 scheme-mode
 
 (package...
diff --git a/etc/snippets/tempel/text-mode b/etc/snippets/tempel/text-mode.eld
similarity index 99%
rename from etc/snippets/tempel/text-mode
rename to etc/snippets/tempel/text-mode.eld
index c635b7ee6f..397221b846 100644
--- a/etc/snippets/tempel/text-mode
+++ b/etc/snippets/tempel/text-mode.eld
@@ -1,5 +1,3 @@
--*- mode: lisp-data -*-
-
 text-mode :when (bound-and-true-p git-commit-mode)
 
 (add\ "gnu: Add "
-- 
2.46.0





Reply sent to "jgart" <jgart <at> dismail.de>:
You have taken responsibility. (Sat, 21 Sep 2024 16:10:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Sat, 21 Sep 2024 16:10:02 GMT) Full text and rfc822 format available.

Message #10 received at 73253-done <at> debbugs.gnu.org (full text, mbox):

From: "jgart" <jgart <at> dismail.de>
To: 73253-done <at> debbugs.gnu.org, "Nicolas Graves" <ngraves <at> ngraves.fr>
Subject: Re: [PATCH] .dir-locals.el: Add tempel snippets.
Date: Sat, 21 Sep 2024 16:09:25 +0000
This is great! Thanks.

Tested and applied.

all best,

jgart




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 20 Oct 2024 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.