]> code.delx.au - gnu-emacs-elpa/commitdiff
(debbugs-send-control-message): Record the bug number on group
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 2 Jul 2011 22:13:58 +0000 (00:13 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 2 Jul 2011 22:13:58 +0000 (00:13 +0200)
entry, so that we don't have to rely on subject header mangling,
which is fragile.

packages/debbugs/ChangeLog
packages/debbugs/debbugs-gnu.el

index 46665518a66610d0de2c9fdb004c267b30fee4db..d1bcd54cd9a789748661385695477534d9b33e53 100644 (file)
@@ -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>
 
index 980e3a6a09b429d8f42c85345fda3175ee41e40b..634201faddf07a22b40f61d19ba4752563321bb5 100644 (file)
                     (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