diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-01-08 16:32:01 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-01-08 16:32:01 +0200 |
commit | c54fda643d4407aed729a6a84fdd28c69373580b (patch) | |
tree | c0f0da9ce13a475aad281913f2e75a25374d1f8a /lisp/mail/rmail.el | |
parent | d193801f59822554d28e497da146d982f5ab7995 (diff) | |
download | emacs-c54fda643d4407aed729a6a84fdd28c69373580b.tar.gz |
Fix Subject "simplification" in Rmail
* lisp/mail/rmail.el (rmail-simplified-subject): Match against
"[external]" _after_ decoding the Subject by RFC-2047.
Diffstat (limited to 'lisp/mail/rmail.el')
-rw-r--r-- | lisp/mail/rmail.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index c598e67dab8..49eaeb560e0 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -3356,12 +3356,12 @@ removing prefixes such as Re:, Fwd: and so on and mailing list tags such as [tag]." (let ((subject (or (rmail-get-header "Subject" msgnum) "")) (regexp "\\`[ \t\n]*\\(\\(\\w\\{1,4\\}\u00a0*[::]\\|\\[[^]]+]\\)[ \t\n]+\\)*")) + (setq subject (rfc2047-decode-string subject)) ;; Corporate mailing systems sometimes add `[External] :'; if that happened, ;; delete everything up thru there. Empirically, that deletion makes ;; the Subject match the other messages in the thread. (if (string-match "\\[external][ \t\n]*:" subject) (setq subject (substring subject (match-end 0)))) - (setq subject (rfc2047-decode-string subject)) (setq subject (replace-regexp-in-string regexp "" subject)) (replace-regexp-in-string "[ \t\n]+" " " subject))) |