unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: 44547@debbugs.gnu.org
Subject: [bug#44547] [PATCH 1/2] etc: snippets: Fix package name extraction.
Date: Tue, 10 Nov 2020 10:16:24 +0100	[thread overview]
Message-ID: <20201110091625.3515-1-mail@ambrevar.xyz> (raw)
In-Reply-To: <20201110090843.30309-1-mail@ambrevar.xyz>

* etc/snippets/text-mode/guix-commit-message-add-package: Properly extract
name when the diff contains a very short `define-public ...` above the actual
new package.  This can happen when the above package is a small inherited
definition or cl/ecl package.
---
 etc/snippets/text-mode/guix-commit-message-add-package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/snippets/text-mode/guix-commit-message-add-package b/etc/snippets/text-mode/guix-commit-message-add-package
index 0dff2cbcf5..e54a06de7e 100644
--- a/etc/snippets/text-mode/guix-commit-message-add-package
+++ b/etc/snippets/text-mode/guix-commit-message-add-package
@@ -7,7 +7,7 @@ gnu: Add ${1:`(with-temp-buffer
                 (magit-git-wash #'magit-diff-wash-diffs
                   "diff" "--staged")
                 (beginning-of-buffer)
-                (when (search-forward "(define-public " nil 'noerror)
+                (when (search-forward "+(define-public " nil 'noerror)
                   (thing-at-point 'sexp 'no-properties)))`}.
 
 * `(car (magit-staged-files))` ($1): New variable.
\ No newline at end of file
-- 
2.28.0





  reply	other threads:[~2020-11-10  9:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  9:08 [bug#44547] [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages Pierre Neidhardt
2020-11-10  9:16 ` Pierre Neidhardt [this message]
2020-11-10  9:16   ` [bug#44547] [PATCH 2/2] etc: snippets: Prefill Common Lisp package names Pierre Neidhardt
     [not found] ` <handler.44547.B.160499933824191.ack@debbugs.gnu.org>
2020-11-20 10:26   ` [bug#44547] Acknowledgement ([PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages) Pierre Neidhardt
2020-11-21  9:17     ` [bug#44547] [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages Guillaume Le Vaillant
2020-11-21 11:03       ` Pierre Neidhardt
2020-11-21 11:05         ` [bug#44547] [PATCH v2 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
2020-11-21 11:05           ` [bug#44547] [PATCH v2 2/2] etc: snippets: Prefill Common Lisp package names Pierre Neidhardt
2020-11-21 11:11         ` [bug#44547] [PATCH v3 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
2020-11-21 11:11           ` [bug#44547] [PATCH v3 2/2] etc: snippets: Prefill Common Lisp package names Pierre Neidhardt
2020-11-21 12:43             ` Guillaume Le Vaillant
2020-11-23 10:16               ` Pierre Neidhardt

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201110091625.3515-1-mail@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=44547@debbugs.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 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).