X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=6b8bd199d627f38b4b5ebe884d4ce5a4c9c2c07f;hp=acc2f5e10b2249c28e1945c012e93e1e135d68c7;hb=9b7e0dcb9a8bd8a5898d9dd68715f3a0d0e5280d;hpb=cbc4876a33d34be8cb6abad9303c366a6be142a8 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index acc2f5e1..6b8bd199 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -39,6 +39,7 @@ (declare-function notmuch-call-notmuch-process "notmuch" (&rest args)) (declare-function notmuch-fontify-headers "notmuch" nil) (declare-function notmuch-select-tag-with-completion "notmuch" (prompt &rest search-terms)) +(declare-function notmuch-search-next-thread "notmuch" nil) (declare-function notmuch-search-show-thread "notmuch" nil) (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date") @@ -315,11 +316,15 @@ unchanged ADDRESS if parsing fails." (t (setq p-address address))) - ;; Remove outer double quotes. They might be required during - ;; transport, but we don't need to see them. - (when (and p-name - (string-match "^\"\\(.*\\)\"$" p-name)) - (setq p-name (match-string 1 p-name))) + ;; Remove elements of the mailbox part that are not relevant for + ;; display, even if they are required during transport. + (when p-name + ;; Outer double quotes. + (when (string-match "^\"\\(.*\\)\"$" p-name) + (setq p-name (match-string 1 p-name))) + + ;; Backslashes. + (setq p-name (replace-regexp-in-string "\\\\" "" p-name))) ;; If the address is 'foo@bar.com ' then show just ;; 'foo@bar.com'. @@ -1563,7 +1568,7 @@ argument, hide all of the messages." (if parent-buffer (progn (switch-to-buffer parent-buffer) - (forward-line) + (notmuch-search-next-thread) (if show-next (notmuch-search-show-thread))))))