From unknown Tue Jun 24 17:24:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20396 <20396@debbugs.gnu.org> To: bug#20396 <20396@debbugs.gnu.org> Subject: Status: 24.5; incorrect subject in replies Reply-To: bug#20396 <20396@debbugs.gnu.org> Date: Wed, 25 Jun 2025 00:24:55 +0000 retitle 20396 24.5; incorrect subject in replies reassign 20396 emacs submitter 20396 Nicolas Graner severity 20396 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 21 10:35:34 2015 Received: (at submit) by debbugs.gnu.org; 21 Apr 2015 14:35:35 +0000 Received: from localhost ([127.0.0.1]:35388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YkZGw-0007lM-5i for submit@debbugs.gnu.org; Tue, 21 Apr 2015 10:35:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50707) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YkZGu-0007lA-C9 for submit@debbugs.gnu.org; Tue, 21 Apr 2015 10:35:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkZGn-0004hU-68 for submit@debbugs.gnu.org; Tue, 21 Apr 2015 10:35:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkZGn-0004hM-1L for submit@debbugs.gnu.org; Tue, 21 Apr 2015 10:35:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkZGl-0000HE-8P for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2015 10:35:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkZGh-0004gP-50 for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2015 10:35:23 -0400 Received: from mx2.u-psud.fr ([129.175.212.65]:18588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkZGg-0004gB-Ut for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2015 10:35:19 -0400 Received: from mx2.u-psud.fr (mx2 [127.0.0.1]) by localhost (MTA) with SMTP id 4DF3A3022A1 for ; Tue, 21 Apr 2015 16:35:17 +0200 (CEST) Received: from infodell9602 (cvc177.sciences.u-psud.fr [129.175.141.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx2.u-psud.fr (MTA) with ESMTPS id 2311D301D19 for ; Tue, 21 Apr 2015 16:35:17 +0200 (CEST) From: Nicolas Graner To: bug-gnu-emacs@gnu.org Subject: 24.5; incorrect subject in replies Date: Tue, 21 Apr 2015 16:35:15 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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: =3D?utf-8?Q?Re:_caf=3DC3=3DA9?=3D Rmail correctly displays it as: Subject: Re: caf=E9 with a final "e acute". But when you reply to it, the message header contains: Subject: Re: Re: caf=E9 instead of just: Subject: Re: caf=E9 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=3D/home/kbrown/src/cygemacs/emacs-24.5-1.i686/src/emacs-24.5 --prefix=3D/usr --exec-prefix=3D/usr --localstatedir=3D/var --sysconfdir=3D= /etc --docdir=3D/usr/share/doc/emacs --htmldir=3D/usr/share/doc/emacs/html -C --without-gconf --without-gsettings 'CFLAGS=3D-ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=3D/home/kbrown/src/cygemacs/emacs-24.5-1.i686/build=3D/u= sr/src/debug/emacs-24.5-1 -fdebug-prefix-map=3D/home/kbrown/src/cygemacs/emacs-24.5-1.i686/src/emacs-= 24.5=3D/usr/src/debug/emacs-24.5-1' CPPFLAGS=3D LDFLAGS=3D' 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)) From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 27 15:30:28 2015 Received: (at 20396) by debbugs.gnu.org; 27 Apr 2015 19:30:28 +0000 Received: from localhost ([127.0.0.1]:41545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YmojY-00052C-MD for submit@debbugs.gnu.org; Mon, 27 Apr 2015 15:30:25 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:44950 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YmojT-000520-Hf for 20396@debbugs.gnu.org; Mon, 27 Apr 2015 15:30:20 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YmojS-0003RD-Cw; Mon, 27 Apr 2015 15:30:18 -0400 From: Glenn Morris To: Nicolas Graner Subject: Re: bug#20396: 24.5; incorrect subject in replies References: X-Spook: New World Order Compsec Operation Iraqi Freedom clones X-Ran: (}|kf:d<\fRd6>ih"pO43Amfjumer X-Hue: yellow X-Attribution: GM Date: Mon, 27 Apr 2015 15:30:18 -0400 In-Reply-To: (Nicolas Graner's message of "Tue, 21 Apr 2015 16:35:15 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 20396 Cc: 20396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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)) From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 27 16:46:00 2015 Received: (at 20396) by debbugs.gnu.org; 27 Apr 2015 20:46:01 +0000 Received: from localhost ([127.0.0.1]:41606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ympuh-0001OD-OJ for submit@debbugs.gnu.org; Mon, 27 Apr 2015 16:46:00 -0400 Received: from panel.vitry.ouvaton.coop ([194.36.166.20]:60470) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ympuf-0001O3-AB for 20396@debbugs.gnu.org; Mon, 27 Apr 2015 16:45:58 -0400 Received: from packard-a156abe (110.124.67.86.rev.sfr.net [86.67.124.110]) by panel.vitry.ouvaton.coop (Postfix) with ESMTPSA id C3F9FA2287; Mon, 27 Apr 2015 22:45:55 +0200 (CEST) From: Nicolas Graner To: Glenn Morris Subject: Re: bug#20396: 24.5; incorrect subject in replies In-Reply-To: (message from Glenn Morris on Mon, 27 Apr 2015 15:30:18 -0400) Date: Mon, 27 Apr 2015 22:45:44 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-PPP-Message-ID: <20150427204556.26235.95364@panel.vitry.ouvaton.coop> X-PPP-Vhost: graner.name X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20396 Cc: 20396@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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)) From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 27 17:19:15 2015 Received: (at 20396-done) by debbugs.gnu.org; 27 Apr 2015 21:19:15 +0000 Received: from localhost ([127.0.0.1]:41631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YmqQs-0003bW-Q2 for submit@debbugs.gnu.org; Mon, 27 Apr 2015 17:19:15 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:47231 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YmqQq-0003bO-GW for 20396-done@debbugs.gnu.org; Mon, 27 Apr 2015 17:19:13 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1YmqQo-00028H-Ch; Mon, 27 Apr 2015 17:19:10 -0400 From: Glenn Morris To: 20396-done@debbugs.gnu.org Subject: Re: bug#20396: 24.5; incorrect subject in replies References: X-Spook: Watergate White House supercomputer CESID MDA Mafia Tony X-Ran: E(DAi**!QH{N$E1,DV"?)&'kwX<'P8g6VrdDZ~P9}=xYo+5b.Dh_3%J-0cmR/6}0O}>\>5 X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 27 Apr 2015 17:19:10 -0400 In-Reply-To: (Nicolas Graner's message of "Mon, 27 Apr 2015 22:45:44 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 20396-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) Version: 25.1 Thanks; applied. From unknown Tue Jun 24 17:24:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 26 May 2015 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator