GNU bug report logs - #44547
[PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages

Previous Next

Package: guix-patches;

Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>

Date: Tue, 10 Nov 2020 09:09:01 UTC

Severity: normal

Tags: patch

Done: Pierre Neidhardt <mail <at> ambrevar.xyz>

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 44547 in the body.
You can then email your comments to 44547 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#44547; Package guix-patches. (Tue, 10 Nov 2020 09:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 10 Nov 2020 09:09:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: guix-patches <at> gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>,
 Katherine Cox-Buday <cox.katherine.e <at> gmail.com>
Subject: [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome
 Common Lisp packages
Date: Tue, 10 Nov 2020 10:08:43 +0100
Commit messages for Common Lisp packages are particularly cumbersome to write
since almost everytime we don't add 1 but 3 new variables.

This snippet should make Lispers' life easier.

Also fix the original "add" snippet to extract name more reliably.

Pierre Neidhardt (2):
  etc: snippets: Fix package name extraction.
  etc: snippets: Prefill Common Lisp package names.

 .../text-mode/guix-commit-message-add-cl-package    | 13 +++++++++++++
 .../text-mode/guix-commit-message-add-package       |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 etc/snippets/text-mode/guix-commit-message-add-cl-package


base-commit: 94585fffb23079fe71110e2bf99782eb4ccfa12b
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Tue, 10 Nov 2020 09:17:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44547 <at> debbugs.gnu.org
Subject: [PATCH 1/2] etc: snippets: Fix package name extraction.
Date: Tue, 10 Nov 2020 10:16:24 +0100
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Tue, 10 Nov 2020 09:17:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44547 <at> debbugs.gnu.org
Subject: [PATCH 2/2] etc: snippets: Prefill Common Lisp package names.
Date: Tue, 10 Nov 2020 10:16:25 +0100
* etc/snippets/text-mode/guix-commit-message-add-cl-package: New file.
---
 .../text-mode/guix-commit-message-add-cl-package    | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 etc/snippets/text-mode/guix-commit-message-add-cl-package

diff --git a/etc/snippets/text-mode/guix-commit-message-add-cl-package b/etc/snippets/text-mode/guix-commit-message-add-cl-package
new file mode 100644
index 0000000000..40f1bb2a5c
--- /dev/null
+++ b/etc/snippets/text-mode/guix-commit-message-add-cl-package
@@ -0,0 +1,13 @@
+# -*- mode: snippet -*-
+# name: guix-commit-message-add-cl-package
+# key: addcl
+# condition: git-commit-mode
+# --
+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)
+                  (thing-at-point 'sexp 'no-properties)))`}.
+
+* `(car (magit-staged-files))` (${1:$(replace-regexp-in-string "^sbcl" "cl"  yas-text)}, ${1:$(replace-regexp-in-string "^sbcl" "ecl"  yas-text)}, $1): New variables.
\ No newline at end of file
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Fri, 20 Nov 2020 10:27:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44547 <at> debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>
Subject: Re: bug#44547: Acknowledgement ([PATCH 0/2] Fix "add" snippet and
 new "addcl" snippet for cumbersome Common Lisp packages)
Date: Fri, 20 Nov 2020 11:26:26 +0100
[Message part 1 (text/plain, inline)]
Hi Guillaume,

what do you think of this patch? :)

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Sat, 21 Nov 2020 09:19:01 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 44547 <at> debbugs.gnu.org
Subject: Re: [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for
 cumbersome Common Lisp packages
Date: Sat, 21 Nov 2020 10:17:56 +0100
[Message part 1 (text/plain, inline)]
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

> Hi Guillaume,
>
> what do you think of this patch? :)

Hi,

I tested the "addcl" snippet with a few packages and it worked pretty
well. The only issue I saw is when the main package name is
"sbcl-cl-xyz", the name of the source package in the commit message
becomes "cl-cl-xyz" instead of "cl-xyz".
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Sat, 21 Nov 2020 11:05:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 44547 <at> debbugs.gnu.org
Subject: Re: [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for
 cumbersome Common Lisp packages
Date: Sat, 21 Nov 2020 12:03:53 +0100
[Message part 1 (text/plain, inline)]
Good catch, I'll send a fix just now.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Sat, 21 Nov 2020 11:06:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44547 <at> debbugs.gnu.org
Subject: [PATCH v2 1/2] etc: snippets: Fix package name extraction.
Date: Sat, 21 Nov 2020 12:05:32 +0100
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Sat, 21 Nov 2020 11:06:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44547 <at> debbugs.gnu.org
Subject: [PATCH v2 2/2] etc: snippets: Prefill Common Lisp package names.
Date: Sat, 21 Nov 2020 12:05:33 +0100
* etc/snippets/text-mode/guix-commit-message-add-cl-package: New file.
---
 .../text-mode/guix-commit-message-add-cl-package    | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 etc/snippets/text-mode/guix-commit-message-add-cl-package

diff --git a/etc/snippets/text-mode/guix-commit-message-add-cl-package b/etc/snippets/text-mode/guix-commit-message-add-cl-package
new file mode 100644
index 0000000000..60473b7d1c
--- /dev/null
+++ b/etc/snippets/text-mode/guix-commit-message-add-cl-package
@@ -0,0 +1,13 @@
+# -*- mode: snippet -*-
+# name: guix-commit-message-add-cl-package
+# key: addcl
+# condition: git-commit-mode
+# --
+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)
+                  (thing-at-point 'sexp 'no-properties)))`}.
+
+* `(car (magit-staged-files))` (${1:$(replace-regexp-in-string "^sbcl\\\\(-cl\\\\)?" "cl"  yas-text)}, ${1:$(replace-regexp-in-string "^sbcl" "ecl"  yas-text)}, $1): New variables.
\ No newline at end of file
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Sat, 21 Nov 2020 11:12:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44547 <at> debbugs.gnu.org
Subject: [PATCH v3 2/2] etc: snippets: Prefill Common Lisp package names.
Date: Sat, 21 Nov 2020 12:11:25 +0100
* etc/snippets/text-mode/guix-commit-message-add-cl-package: New file.
---
 .../text-mode/guix-commit-message-add-cl-package    | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 etc/snippets/text-mode/guix-commit-message-add-cl-package

diff --git a/etc/snippets/text-mode/guix-commit-message-add-cl-package b/etc/snippets/text-mode/guix-commit-message-add-cl-package
new file mode 100644
index 0000000000..d32b9e11b1
--- /dev/null
+++ b/etc/snippets/text-mode/guix-commit-message-add-cl-package
@@ -0,0 +1,13 @@
+# -*- mode: snippet -*-
+# name: guix-commit-message-add-cl-package
+# key: addcl
+# condition: git-commit-mode
+# --
+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)
+                  (thing-at-point 'sexp 'no-properties)))`}.
+
+* `(car (magit-staged-files))` (${1:$(replace-regexp-in-string (rx line-start "sbcl" (optional "-cl")) "cl"  yas-text)}, ${1:$(replace-regexp-in-string "^sbcl" "ecl"  yas-text)}, $1): New variables.
\ No newline at end of file
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Sat, 21 Nov 2020 11:12:02 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 44547 <at> debbugs.gnu.org
Subject: [PATCH v3 1/2] etc: snippets: Fix package name extraction.
Date: Sat, 21 Nov 2020 12:11:24 +0100
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Sat, 21 Nov 2020 12:44:01 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 44547 <at> debbugs.gnu.org
Subject: Re: [bug#44547] [PATCH v3 2/2] etc: snippets: Prefill Common Lisp
 package names.
Date: Sat, 21 Nov 2020 13:43:06 +0100
[Message part 1 (text/plain, inline)]
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

> * etc/snippets/text-mode/guix-commit-message-add-cl-package: New file.
> ---
>  .../text-mode/guix-commit-message-add-cl-package    | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>  create mode 100644 etc/snippets/text-mode/guix-commit-message-add-cl-package
>
> diff --git a/etc/snippets/text-mode/guix-commit-message-add-cl-package b/etc/snippets/text-mode/guix-commit-message-add-cl-package
> new file mode 100644
> index 0000000000..d32b9e11b1
> --- /dev/null
> +++ b/etc/snippets/text-mode/guix-commit-message-add-cl-package
> @@ -0,0 +1,13 @@
> +# -*- mode: snippet -*-
> +# name: guix-commit-message-add-cl-package
> +# key: addcl
> +# condition: git-commit-mode
> +# --
> +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)
> +                  (thing-at-point 'sexp 'no-properties)))`}.
> +
> +* `(car (magit-staged-files))` (${1:$(replace-regexp-in-string (rx line-start "sbcl" (optional "-cl")) "cl"  yas-text)}, ${1:$(replace-regexp-in-string "^sbcl" "ecl"  yas-text)}, $1): New variables.
> \ No newline at end of file

LGTM.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44547; Package guix-patches. (Mon, 23 Nov 2020 10:17:01 GMT) Full text and rfc822 format available.

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

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 44547 <at> debbugs.gnu.org
Subject: Re: [bug#44547] [PATCH v3 2/2] etc: snippets: Prefill Common Lisp
 package names.
Date: Mon, 23 Nov 2020 11:16:47 +0100
[Message part 1 (text/plain, inline)]
Thanks, merged as 
add47499170222f1d449a9a63444e01f115805ff.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

bug closed, send any further explanations to 44547 <at> debbugs.gnu.org and Pierre Neidhardt <mail <at> ambrevar.xyz> Request was from Pierre Neidhardt <mail <at> ambrevar.xyz> to control <at> debbugs.gnu.org. (Mon, 23 Nov 2020 10:18:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 21 Dec 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 232 days ago.

Previous Next


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