all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20396: 24.5; incorrect subject in replies
@ 2015-04-21 14:35 Nicolas Graner
  2015-04-27 19:30 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Graner @ 2015-04-21 14:35 UTC (permalink / raw
  To: 20396


When you reply to a message whose Subject starts with "Re: ", this is
normally stripped from the Subject before a new "Re: " is added in the
reply. But if the Subject is RFC2047-encoded, stripping does not
happen and you end up with "Re: Re: " in the reply.

Example: a message contains:

  Subject: =?utf-8?Q?Re:_caf=C3=A9?=

Rmail correctly displays it as:

  Subject: Re: café

with a final "e acute". But when you reply to it, the message header
contains:

  Subject: Re: Re: café

instead of just:

  Subject: Re: café

This does not happen when the Subject is entirely in US-ASCII and
therefore not RFC2047-encoded.

Nicolas Graner




In GNU Emacs 24.5.1 (i686-pc-cygwin, GTK+ Version 3.14.10)
 of 2015-04-10 on desktop-new
Configured using:
 `configure
--srcdir=/home/kbrown/src/cygemacs/emacs-24.5-1.i686/src/emacs-24.5
--prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
--docdir=/usr/share/doc/emacs --htmldir=/usr/share/doc/emacs/html -C
--without-gconf --without-gsettings 'CFLAGS=-ggdb -O2 -pipe
-Wimplicit-function-declaration
-fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.5-1.i686/build=/usr/src/debug/emacs-24.5-1
-fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.5-1.i686/src/emacs-24.5=/usr/src/debug/emacs-24.5-1'
CPPFLAGS= LDFLAGS='

Important settings:
  value of $LANG: fr_FR
  locale-coding-system: iso-latin-1-unix

Major mode: RMAIL

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type M-x about-emacs.
Counting messages...done
(No new mail has arrived)
0 new messages read
Computing summary lines...done
Quit [3 times]
Counting messages...done
Computing summary lines...done
Mark saved where search started
Quit [2 times]

Load-path shadows:
~/bin/Emacs/undigest hides /usr/share/emacs/24.5/lisp/mail/undigest

Features:
(shadow sort gnus-util mail-extr emacsbug sendmail misearch
multi-isearch rmailsum qp rmailmm message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader mail-parse rfc2231 rmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils time-date cl-macs cl gv cl-loaddefs
cl-lib tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 8 93790 11554)
 (symbols 24 19153 0)
 (miscs 20 3184 1659)
 (strings 16 16576 3962)
 (string-bytes 1 615660)
 (vectors 8 8825)
 (vector-slots 4 372389 6818)
 (floats 8 71 296)
 (intervals 28 3228 827)
 (buffers 512 17))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20396: 24.5; incorrect subject in replies
  2015-04-21 14:35 bug#20396: 24.5; incorrect subject in replies Nicolas Graner
@ 2015-04-27 19:30 ` Glenn Morris
  2015-04-27 20:45   ` Nicolas Graner
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2015-04-27 19:30 UTC (permalink / raw
  To: Nicolas Graner; +Cc: 20396

Nicolas Graner wrote:

> When you reply to a message whose Subject starts with "Re: ", this is
> normally stripped from the Subject before a new "Re: " is added in the
> reply. But if the Subject is RFC2047-encoded, stripping does not
> happen and you end up with "Re: Re: " in the reply.

Thanks for the report. Does this fix it?
(Apply patch, M-x emacs-lisp-byte-compile-and-load rmail.el)

--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -3830,7 +3830,8 @@ use \\[mail-yank-original] to yank the original message into it."
 ;;;	  (setq cc resent-cc)))
     ;; Add `Re: ' to subject if not there already.
     (and (stringp subject)
-	 (setq subject
+	 (setq subject (rfc2047-decode-string subject)
+	       subject
 	       (concat rmail-reply-prefix
 		       (if (let ((case-fold-search t))
 			     (string-match rmail-reply-regexp subject))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20396: 24.5; incorrect subject in replies
  2015-04-27 19:30 ` Glenn Morris
@ 2015-04-27 20:45   ` Nicolas Graner
  2015-04-27 21:19     ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Graner @ 2015-04-27 20:45 UTC (permalink / raw
  To: Glenn Morris; +Cc: 20396

Glenn Morris wrote:
> Nicolas Graner wrote:
>
>> When you reply to a message whose Subject starts with "Re: ", this is
>> normally stripped from the Subject before a new "Re: " is added in the
>> reply. But if the Subject is RFC2047-encoded, stripping does not
>> happen and you end up with "Re: Re: " in the reply.
>
> Thanks for the report. Does this fix it?
> (Apply patch, M-x emacs-lisp-byte-compile-and-load rmail.el)

Yes, it works. Thanks!

Nicolas


> --- a/lisp/mail/rmail.el
> +++ b/lisp/mail/rmail.el
> @@ -3830,7 +3830,8 @@ use \\[mail-yank-original] to yank the original message into it."
>  ;;;	  (setq cc resent-cc)))
>      ;; Add `Re: ' to subject if not there already.
>      (and (stringp subject)
> -	 (setq subject
> +	 (setq subject (rfc2047-decode-string subject)
> +	       subject
>  	       (concat rmail-reply-prefix
>  		       (if (let ((case-fold-search t))
>  			     (string-match rmail-reply-regexp subject))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20396: 24.5; incorrect subject in replies
  2015-04-27 20:45   ` Nicolas Graner
@ 2015-04-27 21:19     ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2015-04-27 21:19 UTC (permalink / raw
  To: 20396-done

Version: 25.1

Thanks; applied.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-27 21:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21 14:35 bug#20396: 24.5; incorrect subject in replies Nicolas Graner
2015-04-27 19:30 ` Glenn Morris
2015-04-27 20:45   ` Nicolas Graner
2015-04-27 21:19     ` Glenn Morris

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.