GNU bug report logs - #2017
23.0.60; C-c in Rmail re-encodes quoted-printable parts

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sat, 24 Jan 2009 12:05:05 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#2017 closed by Eli Zaretskii <eliz <at> gnu.org> (Re: bug#2017: 
 23.0.60; C-c in Rmail re-encodes quoted-printable parts)
Date: Sat, 07 Feb 2009 15:35:05 +0000
[Message part 1 (text/plain, inline)]
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 <eliz <at> gnu.org>.

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 <eliz <at> gnu.org> by
replying to this email.


-- 
2017: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2017
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: 2017-done <at> debbugs.gnu.org
Subject: Re: bug#2017: 23.0.60; C-c in Rmail re-encodes quoted-printable parts
Date: Sat, 07 Feb 2009 17:25:31 +0200
> From: Richard M Stallman <rms <at> gnu.org>
> 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.

[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; C-c in Rmail re-encodes quoted-printable parts
Date: Sat, 24 Jan 2009 13:57:54 +0200
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:
<help-echo> <help-echo> <down-mouse-1> <help-echo> 
<drag-mouse-1> C-x 4 b <up> <M-right> <right> <M-right> 
- <tab> <return> <help-echo> <down-mouse-1> <help-echo> 
<mouse-movement> <drag-mouse-1> C-x o p <next> <prior> 
C-x C-s <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <next> <prior> <next> <next> 
<next> <next> <next> <next> <next> <next> <prior> <prior> 
<prior> <prior> <prior> <prior> <prior> <prior> e <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <help-echo> C-SPC <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> 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 ) <return> 
C-c C-c M-x r m a i l - r e d e <tab> c <tab> <tab> 
<C-left> <C-left> <delete> p C-e <tab> C-g <help-echo> 
<help-echo> <help-echo> C-x C-s p p n n M-: <up> C-g 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> C-x k <return> C-u M-x <up> <up> <up> <return> 
<up> <up> <up> <return> M-x <up> <up> <up> <return> 
C-x o <help-echo> <down-mouse-1> <help-echo> <drag-mouse-1> 
<help-echo> <help-echo> p p n n n p p p n n n p <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> e C-SPC <next> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <up> <down> C-x C-x C-x C-x M-: 
( <up> <return> C-x C-x C-x C-x C-c C-c M-x <up> <up> 
<up> <up> <down> <return>

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



This bug report was last modified 16 years and 166 days ago.

Previous Next


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