Subject: bug#57487: closed (Re: bug#57487: [PATCH] guix: Add tempel snippet move.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 26 Sep 2022 19:55:02 +0000

Your bug report

#57487: [PATCH] guix: Add tempel snippet move.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
57487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57487
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#57487: [PATCH] guix: Add tempel snippet move.
From: Ludovic Courtès <[email-masked]>
To: Nicolas Graves <[email-masked]>
Cc: [email-masked]
Date: Mon, 26 Sep 2022 21:54:19 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Nicolas Graves <[email-masked]> skribis:

> ---
>  etc/snippets/tempel/text-mode | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)

Applied with a commit log, thanks!

Ludo’.

Subject: [PATCH] guix: Add tempel snippet move.
From: Nicolas Graves <[email-masked]>
To: [email-masked]
Date: Tue, 30 Aug 2022 16:57:32 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

---
 etc/snippets/tempel/text-mode | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/etc/snippets/tempel/text-mode b/etc/snippets/tempel/text-mode
index a1400aac69..8096d92e47 100644
--- a/etc/snippets/tempel/text-mode
+++ b/etc/snippets/tempel/text-mode
@@ -99,3 +99,20 @@ text-mode :when (and (fboundp 'git-commit-mode) (git-commit-mode))
  ": Use HTTPS home page." n n
  "* " (car (magit-staged-files)) " (" (s var) ")[home-page]: Use HTTPS." n
  (mapconcat (lambda (file) (concat "* " file)) (cdr (magit-staged-files))) n)
+
+(move\ 
+ "gnu: "
+ (p (with-temp-buffer
+      (magit-git-wash #'magit-diff-wash-diffs
+        "diff" "--staged")
+      (goto-char (point-min))
+      (when (re-search-forward "\\-(define-public \\(\\S-+\\)" nil 'noerror)
+        (match-string-no-properties 1)))
+    var)
+ ": Move to "
+ (concat "("
+         (string-replace "\.scm" ""
+                         (string-replace "/" " " (car (magit-staged-files))))
+         ").") n
+ n "* " (car (magit-staged-files)) " (" (s var) "): Move from here…"
+ n "* " (cadr (magit-staged-files)) " (" (s var) "): …to here.")
-- 
2.37.2

-- 
Best regards,
Nicolas Graves