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

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

[elpa] master 414fdd3 1/3: Parse single-word names better


From: Lars Ingebrigtsen
Subject: [elpa] master 414fdd3 1/3: Parse single-word names better
Date: Sat, 10 Oct 2020 22:50:36 -0400 (EDT)

branch: master
commit 414fdd3afabc4de5ae4ee481600d0f763067d98e
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

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

diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index f2179f7..5084b61 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/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]