summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-10-04 16:15:59 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-10-04 16:32:45 -0400
commitde8fc548c6fb89f77c074ae10455913714d13563 (patch)
treead99abfe8185de47808d28f2fa264cea9bd4ba53 /gnu
parente71864793021051cff35597abd59bb2d5649977d (diff)
downloadguix-de8fc548c6fb89f77c074ae10455913714d13563.tar.gz
gnu: emacs-debbugs: Preserve subject when replying to patch threads.
* gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/emacs-xyz.scm (emacs-debbugs) [origin]: Use it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/emacs-xyz.scm3
-rw-r--r--gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch29
3 files changed, 32 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 83b5268c7e..62abaf07c6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1095,6 +1095,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/elm-reactor-static-files.patch		\
   %D%/packages/patches/elogind-fix-rpath.patch			\
   %D%/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch	\
+  %D%/packages/patches/emacs-debbugs-keep-patch-subject.patch	\
   %D%/packages/patches/emacs-deferred-fix-number-of-arguments.patch	\
   %D%/packages/patches/emacs-exec-path.patch			\
   %D%/packages/patches/emacs-ess-fix-obsolete-function-alias.patch	\
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index b063a1b747..33cec1ad98 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -8661,7 +8661,8 @@ by a query, so both a link can refer to several mails.")
        (uri (string-append "https://elpa.gnu.org/packages/debbugs-"
                            version ".tar"))
        (sha256
-        (base32 "1rzv13shadbvy583vjj4zg13v920zpiqrsnn10r3cqqyli89ivn2"))))
+        (base32 "1rzv13shadbvy583vjj4zg13v920zpiqrsnn10r3cqqyli89ivn2"))
+       (patches (search-patches "emacs-debbugs-keep-patch-subject.patch"))))
     (build-system emacs-build-system)
     (arguments '(#:include '("\\.el$" "\\.wsdl$" "\\.info$")))
     (propagated-inputs
diff --git a/gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch b/gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch
new file mode 100644
index 0000000000..7a6cb642d0
--- /dev/null
+++ b/gnu/packages/patches/emacs-debbugs-keep-patch-subject.patch
@@ -0,0 +1,29 @@
+Preserve subject when replying to patch threads.
+Upstream status: likely to be in the next release (bug#66330)
+
+diff --git a/debbugs-gnu.el b/debbugs-gnu.el
+index f366fba11d..cd549e364d 100644
+--- a/debbugs-gnu.el
++++ b/debbugs-gnu.el
+@@ -1747,6 +1747,12 @@ MERGED is the list of bugs merged with this one."
+ 	 (format "Re: bug#%d: %s" id (alist-get 'subject status)))
+     (debbugs-gnu-summary-mode 1)))
+
++(defcustom debbugs-gnu-summary-keep-subject
++  (rx "[PATCH" (? (0+ (not (any digit "/]"))) (1+ digit) "/" (1+ digit)) "]")
++  "Regular expression which keeps the original message subject in replies."
++  :version "29.1"
++  :type 'regexp)
++
+ (defvar debbugs-gnu-summary-mode-map
+   (let ((map (make-sparse-keymap)))
+     (define-key map "C" #'debbugs-gnu-send-control-message)
+@@ -1778,6 +1784,8 @@ MERGED is the list of bugs merged with this one."
+ 			    (cons new new))
+ 			address))))))
+ 	  ,@(and debbugs-gnu-subject
++                 (not (string-match-p debbugs-gnu-summary-keep-subject
++                                      debbugs-gnu-subject))
+ 		 `((subject ,debbugs-gnu-subject)))))))
+
+ (defun debbugs-gnu-guess-current-id ()