From cd03f214470996ec03b126f86afafef5296fd879 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Wed, 25 Jan 2012 13:54:00 +0000 Subject: emacs: Another special case for `notmuch-show-clean-address'. Remove backslashes. --- emacs/notmuch-show.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'emacs/notmuch-show.el') diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index acc2f5e1..84ac6249 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -315,11 +315,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'. -- cgit v1.2.3