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

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

[elpa] externals/debbugs bdf739e 303/311: Parse single-word names better


From: Stefan Monnier
Subject: [elpa] externals/debbugs bdf739e 303/311: Parse single-word names better
Date: Sun, 29 Nov 2020 18:42:35 -0500 (EST)

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

    Parse single-word names better
---
 debbugs-gnu.el | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index f2179f7..5084b61 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -2396,8 +2396,8 @@ If SELECTIVELY, query the user before applying the patch."
     ;; buffer.  Determine which.
     (with-current-buffer gnus-article-buffer
       (dolist (handle (mapcar #'cdr (gnus-article-mime-handles)))
-       (when
-           (string-match "diff\\|patch\\|plain\\|octet" (mm-handle-media-type 
handle))
+       (when (string-match "diff\\|patch\\|plain\\|octet\\|verbatim"
+                           (mm-handle-media-type handle))
          (push (cons (mm-handle-encoding handle)
                      (mm-handle-buffer handle))
                patch-buffers))))
@@ -2406,7 +2406,7 @@ If SELECTIVELY, query the user before applying the patch."
       (with-current-buffer gnus-article-buffer
        (article-decode-charset))
       (push (cons nil gnus-article-buffer) patch-buffers))
-    (dolist (elem patch-buffers)
+    (dolist (elem (nreverse patch-buffers))
       (with-current-buffer (generate-new-buffer "*debbugs input patch*")
        (insert-buffer-substring (cdr elem))
        (cond ((eq (car elem) 'base64)
@@ -2573,7 +2573,7 @@ If SELECTIVELY, query the user before applying the patch."
                  (forward-line 1))
                (setq changelog (buffer-substring
                                 start (line-end-position 0)))))))))
-    (setq from (mail-extract-address-components (or patch-from from)))
+    (setq from (debbugs-gnu--parse-mail (or patch-from from)))
     (let ((add-log-full-name (car from))
          (add-log-mailing-address (cadr from)))
       (add-change-log-entry-other-window)
@@ -2677,12 +2677,17 @@ If SELECTIVELY, query the user before applying the 
patch."
 \\{debbugs-gnu-log-edit-mode-map}"
   :lighter " Debbugs" :keymap debbugs-gnu-log-edit-mode-map)
 
+(defun debbugs-gnu--parse-mail (string)
+  (let* ((mail-extr-ignore-single-names nil)
+        (mail-extr-ignore-realname-equals-mailbox-name nil))
+    (mail-extract-address-components string)))
+
 (defun debbugs-gnu-log-edit-done ()
   "Finish editing the log edit and commit the files."
   (interactive)
   (let ((author (mail-fetch-field "Author")))
     (when (> (length author) 0)
-      (let ((from (mail-extract-address-components author)))
+      (let ((from (debbugs-gnus--parse-mail author)))
        (when (and (zerop (debbugs-gnu-find-contributor
                           (let ((bits (split-string (car from))))
                             (cond



reply via email to

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