* [bug#44547] [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages
@ 2020-11-10 9:08 Pierre Neidhardt
2020-11-10 9:16 ` [bug#44547] [PATCH 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
[not found] ` <handler.44547.B.160499933824191.ack@debbugs.gnu.org>
0 siblings, 2 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-10 9:08 UTC (permalink / raw)
To: 44547; +Cc: Guillaume Le Vaillant, Katherine Cox-Buday
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH 1/2] etc: snippets: Fix package name extraction.
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
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>
1 sibling, 1 reply; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-10 9:16 UTC (permalink / raw)
To: 44547
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH 2/2] etc: snippets: Prefill Common Lisp package names.
2020-11-10 9:16 ` [bug#44547] [PATCH 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
@ 2020-11-10 9:16 ` Pierre Neidhardt
0 siblings, 0 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-10 9:16 UTC (permalink / raw)
To: 44547
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#44547] Acknowledgement ([PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages)
[not found] ` <handler.44547.B.160499933824191.ack@debbugs.gnu.org>
@ 2020-11-20 10:26 ` 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
0 siblings, 1 reply; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-20 10:26 UTC (permalink / raw)
To: 44547; +Cc: Guillaume Le Vaillant
[-- Attachment #1: Type: text/plain, Size: 102 bytes --]
Hi Guillaume,
what do you think of this patch? :)
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages
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 ` Guillaume Le Vaillant
2020-11-21 11:03 ` Pierre Neidhardt
0 siblings, 1 reply; 12+ messages in thread
From: Guillaume Le Vaillant @ 2020-11-21 9:17 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: 44547
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
Pierre Neidhardt <mail@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".
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH 0/2] Fix "add" snippet and new "addcl" snippet for cumbersome Common Lisp packages
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:11 ` [bug#44547] [PATCH v3 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
0 siblings, 2 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-21 11:03 UTC (permalink / raw)
To: Guillaume Le Vaillant; +Cc: 44547
[-- Attachment #1: Type: text/plain, Size: 38 bytes --]
Good catch, I'll send a fix just now.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH v2 1/2] etc: snippets: Fix package name extraction.
2020-11-21 11:03 ` Pierre Neidhardt
@ 2020-11-21 11:05 ` 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
1 sibling, 1 reply; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-21 11:05 UTC (permalink / raw)
To: 44547
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH v2 2/2] etc: snippets: Prefill Common Lisp package names.
2020-11-21 11:05 ` [bug#44547] [PATCH v2 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
@ 2020-11-21 11:05 ` Pierre Neidhardt
0 siblings, 0 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-21 11:05 UTC (permalink / raw)
To: 44547
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH v3 1/2] etc: snippets: Fix package name extraction.
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:11 ` Pierre Neidhardt
2020-11-21 11:11 ` [bug#44547] [PATCH v3 2/2] etc: snippets: Prefill Common Lisp package names Pierre Neidhardt
1 sibling, 1 reply; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-21 11:11 UTC (permalink / raw)
To: 44547
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH v3 2/2] etc: snippets: Prefill Common Lisp package names.
2020-11-21 11:11 ` [bug#44547] [PATCH v3 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
@ 2020-11-21 11:11 ` Pierre Neidhardt
2020-11-21 12:43 ` Guillaume Le Vaillant
0 siblings, 1 reply; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-21 11:11 UTC (permalink / raw)
To: 44547
* 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH v3 2/2] etc: snippets: Prefill Common Lisp package names.
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
0 siblings, 1 reply; 12+ messages in thread
From: Guillaume Le Vaillant @ 2020-11-21 12:43 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: 44547
[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]
Pierre Neidhardt <mail@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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#44547] [PATCH v3 2/2] etc: snippets: Prefill Common Lisp package names.
2020-11-21 12:43 ` Guillaume Le Vaillant
@ 2020-11-23 10:16 ` Pierre Neidhardt
0 siblings, 0 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2020-11-23 10:16 UTC (permalink / raw)
To: Guillaume Le Vaillant; +Cc: 44547
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
Thanks, merged as
add47499170222f1d449a9a63444e01f115805ff.
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-11-23 10:17 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [bug#44547] [PATCH 1/2] etc: snippets: Fix package name extraction Pierre Neidhardt
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.