GNU bug report logs - #20396
24.5; incorrect subject in replies

Previous Next

Package: emacs;

Reported by: Nicolas Graner <nicolas.graner <at> u-psud.fr>

Date: Tue, 21 Apr 2015 14:36:02 UTC

Severity: normal

Found in version 24.5

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20396 in the body.
You can then email your comments to 20396 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20396; Package emacs. (Tue, 21 Apr 2015 14:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graner <nicolas.graner <at> u-psud.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 21 Apr 2015 14:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graner <nicolas.graner <at> u-psud.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; incorrect subject in replies
Date: Tue, 21 Apr 2015 16:35:15 +0200
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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20396; Package emacs. (Mon, 27 Apr 2015 19:31:09 GMT) Full text and rfc822 format available.

Message #8 received at 20396 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Nicolas Graner <nicolas.graner <at> u-psud.fr>
Cc: 20396 <at> debbugs.gnu.org
Subject: Re: bug#20396: 24.5; incorrect subject in replies
Date: Mon, 27 Apr 2015 15:30:18 -0400
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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20396; Package emacs. (Mon, 27 Apr 2015 20:46:04 GMT) Full text and rfc822 format available.

Message #11 received at 20396 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graner <nicolas.graner <at> u-psud.fr>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 20396 <at> debbugs.gnu.org
Subject: Re: bug#20396: 24.5; incorrect subject in replies
Date: Mon, 27 Apr 2015 22:45:44 +0200
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))




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Mon, 27 Apr 2015 21:20:05 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graner <nicolas.graner <at> u-psud.fr>:
bug acknowledged by developer. (Mon, 27 Apr 2015 21:20:07 GMT) Full text and rfc822 format available.

Message #16 received at 20396-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 20396-done <at> debbugs.gnu.org
Subject: Re: bug#20396: 24.5; incorrect subject in replies
Date: Mon, 27 Apr 2015 17:19:10 -0400
Version: 25.1

Thanks; applied.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 May 2015 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.