emacs-devel
[Top][All Lists]
Advanced

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

rmail-reply problem [Re: Deeper freeze for Emacs-23 branch soon]


From: Kenichi Handa
Subject: rmail-reply problem [Re: Deeper freeze for Emacs-23 branch soon]
Date: Mon, 21 Feb 2011 11:30:55 +0900

In article <address@hidden>, Chong Yidong <address@hidden> writes:

> If no major problems with the 23.2.93 pretest crop up during the next
> week or so, we'll institute a deep freeze for the Emacs-23 branch.

> Once this takes effect, commits to that branch should be for regressions
> against 23.2, and documentation fixes, only.  All other bugfixes will go
> into the trunk.  We'll deal with exceptions, such as crashes, on a
> case-by-case basis.

> >From now until then, I urge everyone to help with the bugfixing for the
> 23.3 release.  If you see anything that you think should be a release
> blocker, please point it out (and set the severity to "serious" in the
> bug tracker).

I've just found that rmail-reply still inserts raw headers
in a reply buffer as something like these:

  From: =?utf-8?B?0JrQvtC90L7QvSDQkNGE0LDQvdCw0YHRjNC10LLQuNGH?= 
<address@hidden>
  Subject: =?utf-8?B?0JrQu9C10L3QvtCy0YvQuSDRgdC40YDQvtC/Lg==?=

As a result, sending such a message results in
doubly-decoded headers and thus mail clients receiving such
messages don't show the correct strings.

I have not noticed this problem because I've been using a
special hook to workaround it.  :-(

The simplest and safe fix seems to be the attached one.
But, I'm not sure installing it satisfies the criteria of
"deep freeze" (although I strongly recommend it).

Please judge it.

---
Kenichi Handa
address@hidden

2011-02-21  Kenichi Handa  <address@hidden>

        * mail/rmail.el (rmail-start-mail): Decode "encoded-words" of
        header components.

=== modified file 'lisp/mail/rmail.el'
--- lisp/mail/rmail.el  2011-01-15 03:50:47 +0000
+++ lisp/mail/rmail.el  2011-02-21 02:11:29 +0000
@@ -3449,6 +3449,16 @@
        (setq yank-action (list 'insert-buffer replybuffer)))
     (setq others (cons (cons "cc" cc) others))
     (setq others (cons (cons "in-reply-to" in-reply-to) others))
+    (setq others
+         (mapcar #'(lambda (elt)
+                     (cons (car elt) (if (stringp (cdr elt))
+                                         (rfc2047-decode-string (cdr elt)))))
+                 others))
+    (if (stringp to) (setq to (rfc2047-decode-string to)))
+    (if (stringp in-reply-to)
+       (setq in-reply-to (rfc2047-decode-string in-reply-to)))
+    (if (stringp cc) (setq cc (rfc2047-decode-string cc)))
+    (if (stringp subject) (setq subject (rfc2047-decode-string subject)))
     (if same-window
        (compose-mail to subject others
                      noerase nil




reply via email to

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