From unknown Fri Sep 05 08:44:28 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2017: 23.0.60; C-c in Rmail re-encodes quoted-printable parts Reply-To: Eli Zaretskii , 2017@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 24 Jan 2009 12:05:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 2017 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12327983001929 (code B ref -1); Sat, 24 Jan 2009 12:05:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Jan 2009 11:58:20 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0OBwHxU001922 for ; Sat, 24 Jan 2009 03:58:18 -0800 Received: from mx10.gnu.org ([199.232.76.166]:45457) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LQh7y-0003Rz-0v for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 06:56:42 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LQh9S-0007Zo-Br for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 06:58:15 -0500 Received: from mtaout1.012.net.il ([84.95.2.1]:10180) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQh9Q-0007Yt-GJ for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 06:58:13 -0500 Received: from conversion-daemon.i-mtaout1.012.net.il by i-mtaout1.012.net.il (HyperSendmail v2007.08) id <0KDZ00J0052O8Q00@i-mtaout1.012.net.il> for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 13:58:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.6.113]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KDZ00E9O58XQ290@i-mtaout1.012.net.il> for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 13:58:21 +0200 (IST) Date: Sat, 24 Jan 2009 13:57:54 +0200 From: Eli Zaretskii X-012-Sender: halo1@inter.net.il To: emacs-pretest-bug@gnu.org Message-id: X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 In an Rmail buffer that holds a multi-part message with at least one of the parts encoded in quoted-printable: Type `e', then make a region around the body of the part that is encoded in quoted-printable, and type: M-: (mail-unquote-printable-region (mark) (point) nil nil t) RET The marked part is decoded as expected. Now type `C-c', and watch the Context-Type header be quoted-printable (e.g., "charset=utf-8" becomes "charset=3Dutf-8"). Other `=' characters elsewhere in the body of the partial message also become encoded in quoted-printable. There are 2 bugs here: (1) Rmail should not re-encode the text in any way, and (2) it should never touch the headers. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file d:/gnu/emacs/etc/DEBUG for instructions. In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2009-01-24 on HOME-C4E4A596F7 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1255 default-enable-multibyte-characters: t Major mode: RMAIL Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x 4 b - C-x o p C-x C-s e C-SPC M-: ( m a i l - u n q u o t e - p r i n t a b l e - r e g i o n SPC ( m a r k ) S-SPC ( p o i n t ) S-SPC n i l SPC n i l SPC t ) C-c C-c M-x r m a i l - r e d e c p C-e C-g C-x C-s p p n n M-: C-g C-x k C-u M-x M-x C-x o p p n n n p p p n n n p e C-SPC C-x C-x C-x C-x M-: ( C-x C-x C-x C-x C-c C-c M-x Recent messages: Mark set t Quit Wrote d:/usr/eli/data/mail.in Quit Counting messages...done Computing summary lines...done No following nondeleted message Editing: Type C-c C-c to return to Rmail, C-c C-] to abort Mark set t From lekktu@gmail.com Sat Jan 24 05:04:01 2009 Received: (at control) by emacsbugs.donarmstrong.com; 24 Jan 2009 13:04:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: ** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=2.3 required=4.0 tests=MISSING_SUBJECT,NOSUBJECT, VALID_BTS_CONTROL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-ew0-f10.google.com (mail-ew0-f10.google.com [209.85.219.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0OD3wki018406 for ; Sat, 24 Jan 2009 05:03:59 -0800 Received: by ewy3 with SMTP id 3so5795908ewy.1 for ; Sat, 24 Jan 2009 05:03:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=CeeiEKcbFxmyO9WkWytoNkUy4vayQNZr5BBVIK86kIM=; b=JPmjhPfVMxw6t0npaSIw73VvdwdVGMejycvrnaDNGAdzgOji+rIYU9frjkR40zSFdy mqFaqyFGghJbbcIB5cENiFtFCX60Q3ZarwzjwGZxUebhDQps93H6FKzjo0lAbVrj2nic 63AfqIG2cchsMsfMkoDowPfCmFOTgw8hsHXL4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=ZK/s1LlEYCOcv9ytj0+TTXogTqdcQntcb59DDX699ecqDWqEZTSXGHOhTGnvT9y+8l oiUtTcY5sGz56MTGOnwjeOvA3gUEgImIjCCii7FVe28+UrkHdmezdn70J1iUlmrEqWKE aIAsJTYV/oN2ZQWXVwShJYrMPy9CkuDL1GETY= MIME-Version: 1.0 Received: by 10.210.66.13 with SMTP id o13mr9819670eba.124.1232802232596; Sat, 24 Jan 2009 05:03:52 -0800 (PST) Date: Sat, 24 Jan 2009 14:03:52 +0100 Message-ID: Subject: From: Juanma Barranquero To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit reassign 512 emacs,rmail reassign 1051 emacs,rmail reassign 2000 emacs,rmail reassign 2015 emacs,rmail reassign 2016 emacs,rmail reassign 2017 emacs,rmail reassign 2018 emacs,rmail reassign 2019 emacs,rmail,w32 reassign 1034 emags,gnus reassign 1854 emacs,gnus quit From unknown Fri Sep 05 08:44:28 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#2017: 23.0.60; C-c in Rmail re-encodes quoted-printable parts Reply-To: rms@gnu.org, 2017@debbugs.gnu.org Resent-From: Richard M Stallman Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org Resent-Date: Sun, 25 Jan 2009 18:25:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 2017 X-Emacs-PR-Package: emacs,rmail X-Emacs-PR-Keywords: Received: via spool by 2017-submit@emacsbugs.donarmstrong.com id=B2017.12329073776828 (code B ref 2017); Sun, 25 Jan 2009 18:25:04 +0000 Received: (at 2017) by emacsbugs.donarmstrong.com; 25 Jan 2009 18:16:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0PIGEfA006822 for <2017@emacsbugs.donarmstrong.com>; Sun, 25 Jan 2009 10:16:15 -0800 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LR9VG-0008Tm-Vi; Sun, 25 Jan 2009 13:14:39 -0500 Content-Type: text/plain; charset=ISO-8859-15 From: Richard M Stallman To: Eli Zaretskii , 2017@debbugs.gnu.org In-reply-to: (message from Eli Zaretskii on Sat, 24 Jan 2009 13:57:54 +0200) References: Message-Id: Date: Sun, 25 Jan 2009 13:14:38 -0500 There are 2 bugs here: (1) Rmail should not re-encode the text in any way, and (2) it should never touch the headers. The code in rmail-cease-edit is meant to re-encode the entire message in cases where rmail-show-message decoded the entire message. It should not operate in the case you described. (setq character-coding (mail-fetch-field "content-transfer-encoding") is supposed to get the encoding specified by the message header for the entire message, and it ought not notice anything specified in/for individual mime parts. When this fails for you, what value does character-coding get? If it is non-nil, can you step thru mail-fetch-field and see how that happened? Is it that the header specifies this field and the message also has mime parts? If so, rmail-cease-edit needs to operate only on the "body" and not on any mime parts. In addition, rmail-cease-edit ought to check for editing done in message headers, and install the edited headers into the message. Ideally it should make a list of the headers initially shown so that it can tell if the user deleted any headers and delete those from the message. From unknown Fri Sep 05 08:44:28 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Eli Zaretskii Subject: bug#2017 closed by Eli Zaretskii (Re: bug#2017: 23.0.60; C-c in Rmail re-encodes quoted-printable parts) Message-ID: References: X-Emacs-PR-Message: they-closed 2017 X-Emacs-PR-Package: emacs,rmail Reply-To: 2017@debbugs.gnu.org Date: Sat, 07 Feb 2009 15:35:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1234020905-8268-1" This is a multi-part message in MIME format... ------------=_1234020905-8268-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs,rmail package: #2017: 23.0.60; C-c in Rmail re-encodes quoted-printable parts It has been closed by Eli Zaretskii . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Eli Zaretskii by replying to this email. --=20 2017: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D2017 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1234020905-8268-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2017-done) by emacsbugs.donarmstrong.com; 7 Feb 2009 15:25:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout6.012.net.il (mtaout6.012.net.il [84.95.2.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n17FPeo9006817 for <2017-done@emacsbugs.donarmstrong.com>; Sat, 7 Feb 2009 07:25:41 -0800 Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KEP00D00C1KSI00@i-mtaout6.012.net.il> for 2017-done@emacsbugs.donarmstrong.com; Sat, 07 Feb 2009 17:25:54 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.238.131]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KEP007GPC75L970@i-mtaout6.012.net.il>; Sat, 07 Feb 2009 17:25:54 +0200 (IST) Date: Sat, 07 Feb 2009 17:25:31 +0200 From: Eli Zaretskii Subject: Re: bug#2017: 23.0.60; C-c in Rmail re-encodes quoted-printable parts In-reply-to: X-012-Sender: halo1@inter.net.il To: rms@gnu.org Cc: 2017-done@debbugs.gnu.org Reply-to: Eli Zaretskii Message-id: References: > From: Richard M Stallman > Date: Sun, 25 Jan 2009 13:14:38 -0500 > > (setq character-coding (mail-fetch-field "content-transfer-encoding") > > is supposed to get the encoding specified by the message header for > the entire message, and it ought not notice anything specified > in/for individual mime parts. > > When this fails for you, what value does character-coding get? If it > is non-nil, can you step thru mail-fetch-field and see how that > happened? The problem was that the Rmail buffer was narrowed to the entire message, whereas mail-fetch-field is documented to assume that the buffer is narrowed to just the headers. (Similar problems were with calls to rmail-is-text-p and rmail-get-coding-system.) I fixed that by narrowing to the headers' portion only. > Is it that the header specifies this field > and the message also has mime parts? > If so, rmail-cease-edit needs to operate only on the "body" > and not on any mime parts. If the header specifies content-transfer-encoding, then Rmail will decode the entire message body, including the MIME parts, by this encoding. So it is correct to re-apply that encoding in rmail-cease-edit to the whole body. > In addition, rmail-cease-edit ought to check for editing done in > message headers, and install the edited headers into the message. > Ideally it should make a list of the headers initially shown > so that it can tell if the user deleted any headers and delete those > from the message. It looks like rmail-cease-edit does not support editing the headers at all at this time. But that is a separate problem; I will file a new bug report for it. ------------=_1234020905-8268-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 24 Jan 2009 11:58:20 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0OBwHxU001922 for ; Sat, 24 Jan 2009 03:58:18 -0800 Received: from mx10.gnu.org ([199.232.76.166]:45457) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LQh7y-0003Rz-0v for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 06:56:42 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LQh9S-0007Zo-Br for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 06:58:15 -0500 Received: from mtaout1.012.net.il ([84.95.2.1]:10180) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQh9Q-0007Yt-GJ for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 06:58:13 -0500 Received: from conversion-daemon.i-mtaout1.012.net.il by i-mtaout1.012.net.il (HyperSendmail v2007.08) id <0KDZ00J0052O8Q00@i-mtaout1.012.net.il> for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 13:58:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.6.113]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KDZ00E9O58XQ290@i-mtaout1.012.net.il> for emacs-pretest-bug@gnu.org; Sat, 24 Jan 2009 13:58:21 +0200 (IST) Date: Sat, 24 Jan 2009 13:57:54 +0200 From: Eli Zaretskii Subject: 23.0.60; C-c in Rmail re-encodes quoted-printable parts X-012-Sender: halo1@inter.net.il To: emacs-pretest-bug@gnu.org Reply-to: Eli Zaretskii Message-id: X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 In an Rmail buffer that holds a multi-part message with at least one of the parts encoded in quoted-printable: Type `e', then make a region around the body of the part that is encoded in quoted-printable, and type: M-: (mail-unquote-printable-region (mark) (point) nil nil t) RET The marked part is decoded as expected. Now type `C-c', and watch the Context-Type header be quoted-printable (e.g., "charset=utf-8" becomes "charset=3Dutf-8"). Other `=' characters elsewhere in the body of the partial message also become encoded in quoted-printable. There are 2 bugs here: (1) Rmail should not re-encode the text in any way, and (2) it should never touch the headers. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file d:/gnu/emacs/etc/DEBUG for instructions. In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2009-01-24 on HOME-C4E4A596F7 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1255 default-enable-multibyte-characters: t Major mode: RMAIL Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x 4 b - C-x o p C-x C-s e C-SPC M-: ( m a i l - u n q u o t e - p r i n t a b l e - r e g i o n SPC ( m a r k ) S-SPC ( p o i n t ) S-SPC n i l SPC n i l SPC t ) C-c C-c M-x r m a i l - r e d e c p C-e C-g C-x C-s p p n n M-: C-g C-x k C-u M-x M-x C-x o p p n n n p p p n n n p e C-SPC C-x C-x C-x C-x M-: ( C-x C-x C-x C-x C-c C-c M-x Recent messages: Mark set t Quit Wrote d:/usr/eli/data/mail.in Quit Counting messages...done Computing summary lines...done No following nondeleted message Editing: Type C-c C-c to return to Rmail, C-c C-] to abort Mark set t ------------=_1234020905-8268-1--