unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#57487] [PATCH] guix: Add tempel snippet move.
@ 2022-08-30 14:57 Nicolas Graves via Guix-patches via
  2022-09-26 19:54 ` bug#57487: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-08-30 14:57 UTC (permalink / raw)
  To: 57487

---
 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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#57487: [PATCH] guix: Add tempel snippet move.
  2022-08-30 14:57 [bug#57487] [PATCH] guix: Add tempel snippet move Nicolas Graves via Guix-patches via
@ 2022-09-26 19:54 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2022-09-26 19:54 UTC (permalink / raw)
  To: Nicolas Graves; +Cc: 57487-done

Hi,

Nicolas Graves <ngraves@ngraves.fr> skribis:

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

Applied with a commit log, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-26 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 14:57 [bug#57487] [PATCH] guix: Add tempel snippet move Nicolas Graves via Guix-patches via
2022-09-26 19:54 ` bug#57487: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).