emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 c54fda643d: Fix Subject "simplification" in Rmail


From: Eli Zaretskii
Subject: emacs-28 c54fda643d: Fix Subject "simplification" in Rmail
Date: Sat, 8 Jan 2022 09:32:55 -0500 (EST)

branch: emacs-28
commit c54fda643d4407aed729a6a84fdd28c69373580b
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix Subject "simplification" in Rmail
    
    * lisp/mail/rmail.el (rmail-simplified-subject): Match against
    "[external]" _after_ decoding the Subject by RFC-2047.
---
 lisp/mail/rmail.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index c598e67dab..49eaeb560e 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)))
 



reply via email to

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