emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/debbugs b0ceaf7 016/311: (debbugs-send-control-message)


From: Stefan Monnier
Subject: [elpa] externals/debbugs b0ceaf7 016/311: (debbugs-send-control-message): Record the bug number on group
Date: Sun, 29 Nov 2020 18:41:31 -0500 (EST)

branch: externals/debbugs
commit b0ceaf76214156893962d4b7e16240d58cf1cd33
Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
Commit: Lars Magne Ingebrigtsen <larsi@gnus.org>

    (debbugs-send-control-message): Record the bug number on group
    entry, so that we don't have to rely on subject header mangling,
    which is fragile.
---
 ChangeLog      |  3 +++
 debbugs-gnu.el | 14 ++++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4666551..d1bcd54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
        both bug-gnu-emacs (etc) and debbugs.
        (debbugs-emacs): Default to list the done bugs.
        (debbugs-toggle-sort): New command and keystroke.
+       (debbugs-send-control-message): Record the bug number on group
+       entry, so that we don't have to rely on subject header mangling,
+       which is fragile.
 
 2011-07-02  Michael Albinus  <michael.albinus@gmx.de>
 
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 980e3a6..634201f 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -108,6 +108,9 @@
                     (unless (equal (cdr (assq 'pending status)) "pending")
                       (setq words
                             (concat words "," (cdr (assq 'pending status)))))
+                    (when (cdr (assq 'mergedwith status))
+                      (setq words (format "%s,%s" (cdr (assq 'mergedwith 
status))
+                                          words)))
                     (if (> (length words) 20)
                         (propertize (substring words 0 20) 'help-echo words)
                       words))
@@ -191,6 +194,8 @@ The following commands are available:
     (goto-char (point-min))
     (re-search-forward (concat "^" current-bug) nil t)))
 
+(defvar debbugs-bug-number nil)
+
 (defun debbugs-select-report ()
   "Select the report on the current line."
   (interactive)
@@ -204,7 +209,8 @@ The following commands are available:
      id (cons (current-buffer)
              (current-window-configuration)))
     (with-current-buffer (window-buffer (selected-window))
-      (debbugs-summary-mode 1))))
+      (debbugs-summary-mode 1)
+      (set (make-local-variable 'debbugs-bug-number) id))))
 
 (defvar debbugs-summary-mode-map
   (let ((map (make-sparse-keymap)))
@@ -245,11 +251,7 @@ fixed, and then closed."
            "merge" "forcemerge"
            "patch" "wontfix" "moreinfo" "unreproducible" "fixed" "notabug")
          nil t)))
-  (let* ((subject (mail-header-subject (gnus-summary-article-header)))
-        (id
-         (if (string-match "bug#\\([0-9]+\\)" subject)
-             (string-to-number (match-string 1 subject))
-           (error "No bug number present")))
+  (let* ((id debbugs-bug-number)       ; Set on group entry.
         (version
          (when (member message '("close" "done"))
            (read-string



reply via email to

[Prev in Thread] Current Thread [Next in Thread]