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

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

[elpa] externals/debbugs 23a4b78 203/311: Get the correct patch author n


From: Stefan Monnier
Subject: [elpa] externals/debbugs 23a4b78 203/311: Get the correct patch author name
Date: Sun, 29 Nov 2020 18:42:12 -0500 (EST)

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

    Get the correct patch author name
---
 debbugs-gnu.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index fd0b501..dd17e83 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1696,11 +1696,12 @@ If given a prefix, patch in the branch directory 
instead."
 (defun debbugs-gnu-insert-changelog ()
   "Add a ChangeLog from a recently applied patch from a third party."
   (interactive)
-  (let (from subject patch-subject changelog)
+  (let (from subject patch-subject changelog
+            patch-from)
     (gnus-with-article-buffer
       (widen)
       (goto-char (point-min))
-      (setq from (mail-extract-address-components (gnus-fetch-field "from"))
+      (setq from (gnus-fetch-field "from")
            subject (gnus-fetch-field "subject"))
       ;; If it's a patch formatted the right way, extract that data.
       (dolist (handle (mapcar 'cdr (gnus-article-mime-handles)))
@@ -1714,6 +1715,8 @@ If given a prefix, patch in the branch directory instead."
                   (quoted-printable-decode-region (point-min) (point-max))))
            (setq patch-subject
                  (or (gnus-fetch-field "subject") patch-subject))
+           (setq patch-from
+                 (or (gnus-fetch-field "from") patch-from))
            (goto-char (point-min))
            (when (re-search-forward "^[*] " nil t)
              (let ((start (match-beginning 0)))
@@ -1722,6 +1725,7 @@ If given a prefix, patch in the branch directory instead."
                  (forward-line 1))
                (setq changelog (buffer-substring
                                 start (line-end-position 0)))))))))
+    (setq from (mail-extract-address-components (or patch-from from)))
     (let ((add-log-full-name (car from))
          (add-log-mailing-address (cadr from)))
       (add-change-log-entry-other-window)



reply via email to

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