all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: rmail-reply problem [Re: Deeper freeze for Emacs-23 branch soon]
Date: Mon, 21 Feb 2011 11:30:55 +0900	[thread overview]
Message-ID: <tl78vxace5c.fsf@m17n.org> (raw)
In-Reply-To: <87bp2w4cpt.fsf@stupidchicken.com> (message from Chong Yidong on Mon, 31 Jan 2011 23:10:06 -0500)

In article <87bp2w4cpt.fsf@stupidchicken.com>, Chong Yidong <cyd@stupidchicken.com> 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?= <zecoxut@vneshbank.ru>
  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
handa@m17n.org

2011-02-21  Kenichi Handa  <handa@m17n.org>

	* 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	other threads:[~2011-02-21  2:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01  4:10 Deeper freeze for Emacs-23 branch soon Chong Yidong
2011-02-21  2:30 ` Kenichi Handa [this message]
2011-02-21 17:19   ` rmail-reply problem [Re: Deeper freeze for Emacs-23 branch soon] Chong Yidong
2011-02-22  2:01     ` Kenichi Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tl78vxace5c.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.