GNU bug report logs - #21471
25.0.50; REGRESSION: bug report with text from Info has spurious escape chars

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 13 Sep 2015 15:08:02 UTC

Severity: normal

Merged with 24152

Found in versions 24.5, 25.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 21471 in the body.
You can then email your comments to 21471 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#21471; Package emacs. (Sun, 13 Sep 2015 15:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 13 Sep 2015 15:08:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; REGRESSION: bug report with text from Info has spurious
 escape chars
Date: Sun, 13 Sep 2015 08:07:42 -0700 (PDT)
Dunno whether this regression is perhaps limited to MS Windows or
mail client Outlook.  I am using both.

emacs -Q
C-h i ; Choose Elisp
g font and TAB RET

Select the last paragraph about parameter `alpha' and copy it
using `M-w'.

M-x report-emacs-bug

Yank the copied text into the bug-report buffer.

Hit `C-c C-c'.  Choose to use an external mail client to
send the report.

When the mail client message window opens, select the
boiler-plate text:

*** E-Mail body has been placed on clipboard, please paste it here! ***

Paste the copied report-message text, replacing the selected
boiler-plate text.

This is what you get in the email message, to send as the
bug report:

     The =A1=AEalpha=A1=AF frame parameter can also be a cons cell =A1=AE(=
=A1=AEactive=A1=AF .
     =A1=AEinactive=A1=AF)=A1=AF, where =A1=AEactive=A1=AF is the opacity o=
f the frame when it is
     selected, and =A1=AEinactive=A1=AF is the opacity when it is not selec=
ted.

Curly quotes in the Info buffer have been replaced with
escape sequences such as =A1=AE.  This is in spite of the
fact that the mail-client window into which the text is
pasted is perfectly capable of handling Unicode chars such
as curly quotes.

(Just one more undesirable and unforeseen consequence of the
curly-quote-mania virus, I guess.  Time for yet another
hack-job workaround?)


In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2015-09-05
Repository revision: 2330ca33a97867f2ea1123bcf7bfe5cfcc030b36
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --host=3Di686-pc-mingw32 --enable-checking=3Dyes,glyphs'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252

Major mode: Info

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-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 C-h C-a.
Composing main Info directory...done
Mark set [2 times]
Type C-x 1 to delete the help window, C-M-v to scroll help.
Char: =A1=AE (8216, #o20030, #x2018, file ...) point=3D1897434 of 3604579 (=
53%) <1894203-1899121> column=3D9

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils pp wid-edit descr-text help-mode
cl-loaddefs pcase cl-lib info easymenu dired time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded 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 w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 8 201120 12359)
 (symbols 32 29890 0)
 (miscs 32 66 267)
 (strings 16 33256 8135)
 (string-bytes 1 757007)
 (vectors 8 14837)
 (vector-slots 4 840990 7268)
 (floats 8 133 188)
 (intervals 28 34710 2066)
 (buffers 516 15))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Sun, 13 Sep 2015 19:17:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 21471 <at> debbugs.gnu.org
Subject: Re: 25.0.50; bug report with text from Info has spurious escape chars
Date: Sun, 13 Sep 2015 12:16:48 -0700
This bug is not a regression, as I get similar behavior with Emacs 24.5 on 
Ubuntu 15.04 (email client Thunderbird 38.2.0) as follows:

emacs -Q
C-h i m elisp RET
C-x h M-w
M-x report-emacs-bug RET
test subject RET
C-y
C-c C-c yes RET
mail client RET

The mail that's sent includes strings like this:

Copyright =C2=A9 1990=E2=80=931996, 1998=E2=80=932014 Free Software Foun=
dation, Inc.

even though it's marked "Content-type: text/plain; charset=utf-8; 
format=flowed".  This problem occurs with all non-ASCII characters, not merely 
with curved quotes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Sun, 13 Sep 2015 20:04:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 21471 <at> debbugs.gnu.org
Subject: Re: bug#21471: 25.0.50;
 REGRESSION: bug report with text from Info has spurious escape chars
Date: Sun, 13 Sep 2015 23:02:58 +0300
> Date: Sun, 13 Sep 2015 08:07:42 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> Dunno whether this regression is perhaps limited to MS Windows or
> mail client Outlook.

It isn't.  You can paste into Notepad, or even another Emacs session.

> This is what you get in the email message, to send as the
> bug report:
> 
>      The =A1=AEalpha=A1=AF frame parameter can also be a cons cell =A1=AE(=
> =A1=AEactive=A1=AF .
>      =A1=AEinactive=A1=AF)=A1=AF, where =A1=AEactive=A1=AF is the opacity o=
> f the frame when it is
>      selected, and =A1=AEinactive=A1=AF is the opacity when it is not selec=
> ted.
> 
> Curly quotes in the Info buffer have been replaced with
> escape sequences such as =A1=AE.  This is in spite of the
> fact that the mail-client window into which the text is
> pasted is perfectly capable of handling Unicode chars such
> as curly quotes.

This is called quoted-printable representation of non-ASCII
characters, and is a feature.  I guess whoever wrote that didn't want
to trust mailers on user systems to be configured for non-ASCII.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Sun, 13 Sep 2015 20:56:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 21471 <at> debbugs.gnu.org
Subject: RE: 25.0.50; bug report with text from Info has spurious escape chars
Date: Sun, 13 Sep 2015 13:55:42 -0700 (PDT)
> This bug is not a regression, as I get similar behavior with Emacs 24.5 on
> Ubuntu 15.04 (email client Thunderbird 38.2.0) as follows:
...
> The mail that's sent includes strings like this:
> 
> Copyright =C2=A9 1990=E2=80=931996, 1998=E2=80=932014 Free Software Foun=
> dation, Inc.
> 
> even though it's marked "Content-type: text/plain; charset=utf-8;
> format=flowed".  This problem occurs with all non-ASCII characters, not
> merely with curved quotes.

OK, so it's not a regression, in that Unicode chars have
apparently long been copied and pasted incorrectly in this
context.

But Unicode chars were not used all over the place previously,
which makes it a regression of sorts, in observed behavior.
This will bite lots more users a lot more, even if the problem
was potentially present previously as well.

It's a bad bug, interfering considerably with usability,
regardless of whether we want to call it a regression.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Sun, 13 Sep 2015 21:00:05 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 21471 <at> debbugs.gnu.org
Subject: RE: bug#21471: 25.0.50;	REGRESSION: bug report with text from Info
 has spurious escape chars
Date: Sun, 13 Sep 2015 13:58:57 -0700 (PDT)
> This is called quoted-printable representation of non-ASCII
> characters, and is a feature.  I guess whoever wrote that didn't want
> to trust mailers on user systems to be configured for non-ASCII.

At the very least, if Emacs wants to consider this a feature,
it should be a user option.  Users should be include Unicode
chars normally in bug reports.  Especially now that Emacs
supports Unicode so well and Unicode is used throughout the
manuals.

I'd argue that we should have a user option, and that the
default behavior should be to copy+paste normally.  Anyone
who really needs this "feature" can customize the option
accordingly.

Is there some reason not to proceed that way?  Am I missing
something?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Mon, 14 Sep 2015 06:22:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 21471 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: Re: bug#21471: 25.0.50;
 bug report with text from Info has spurious escape chars
Date: Mon, 14 Sep 2015 09:21:02 +0300
> Date: Sun, 13 Sep 2015 13:55:42 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 21471 <at> debbugs.gnu.org
> 
> > This bug is not a regression, as I get similar behavior with Emacs 24.5 on
> > Ubuntu 15.04 (email client Thunderbird 38.2.0) as follows:
> ...
> > The mail that's sent includes strings like this:
> > 
> > Copyright =C2=A9 1990=E2=80=931996, 1998=E2=80=932014 Free Software Foun=
> > dation, Inc.
> > 
> > even though it's marked "Content-type: text/plain; charset=utf-8;
> > format=flowed".  This problem occurs with all non-ASCII characters, not
> > merely with curved quotes.
> 
> OK, so it's not a regression, in that Unicode chars have
> apparently long been copied and pasted incorrectly in this
> context.

Not "Unicode", any non-ASCII characters.

> But Unicode chars were not used all over the place previously,
> which makes it a regression of sorts, in observed behavior.
> This will bite lots more users a lot more, even if the problem
> was potentially present previously as well.
> 
> It's a bad bug, interfering considerably with usability,
> regardless of whether we want to call it a regression.

You can always copy/paste manually, replacing the text that Emacs put
in the clipboard for you, if you care.

Or you can make the text an attachment.

And please recall that the instructions for writing the bug report
explicitly asked for avoiding non-ASCII characters.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Mon, 14 Sep 2015 06:24:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 21471 <at> debbugs.gnu.org
Subject: Re: bug#21471: 25.0.50;
 REGRESSION: bug report with text from Info has spurious escape chars
Date: Mon, 14 Sep 2015 09:22:12 +0300
> Date: Sun, 13 Sep 2015 13:58:57 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 21471 <at> debbugs.gnu.org
> 
> Is there some reason not to proceed that way?  Am I missing
> something?

Reliability.  The command to report a bug must be 100% reliable, and
it must work out of the box in "emacs -Q".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Mon, 14 Sep 2015 13:43:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 21471 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: RE: bug#21471: 25.0.50;	bug report with text from Info has spurious
 escape chars
Date: Mon, 14 Sep 2015 06:41:51 -0700 (PDT)
> > But Unicode chars were not used all over the place previously,
> > which makes it a regression of sorts, in observed behavior.
> > This will bite lots more users a lot more, even if the problem
> > was potentially present previously as well.
> >
> > It's a bad bug, interfering considerably with usability,
> > regardless of whether we want to call it a regression.
> 
> You can always copy/paste manually, replacing the text that Emacs put
> in the clipboard for you, if you care.
> 
> Or you can make the text an attachment.
> 
> And please recall that the instructions for writing the bug report
> explicitly asked for avoiding non-ASCII characters.

Excuse me?  That sounds like a complete cop-out, to me.

But if you're fine with pasted text from manuals not being
readable, who am I to say that this is a problem?

Telling users to avoid non-ASCII characters flies in the
face of spreading non-ASCII characters all over the manuals.

Do you honestly expect users to strip out all of the curly
quotes or replace them all with ASCII quotes, just to be
able to cite text in the manuals?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Mon, 14 Sep 2015 13:48:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 21471 <at> debbugs.gnu.org
Subject: RE: bug#21471: 25.0.50;	REGRESSION: bug report with text from Info
 has spurious escape chars
Date: Mon, 14 Sep 2015 06:47:12 -0700 (PDT)
> > Is there some reason not to proceed that way?  Am I missing
> > something?
> 
> Reliability.  The command to report a bug must be 100% reliable, and
> it must work out of the box in "emacs -Q".

We already let users configure how bug reporting interacts
with their mail environment.  Why not provide a user option
that handles this correctly?

Even in `emacs -Q', I should be able to copy+paste non-ASCII
text, assuming my mail client can handle it.

I'm sorry to say it, but your response about this really
sounds like a cop-out.  This might not be the most urgent
bug, but I cannot see that this is something that should
be foisted on the user as being her problem (just don't
use `C-c C-c' and instead create a mail-client message
by hand and paste copied non-ASCII text into it manually).

That is not a reasonable answer, IMHO.  But whatever.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 14 Sep 2015 16:39:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Mon, 14 Sep 2015 16:39:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Drew Adams <drew.adams <at> oracle.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 21471-done <at> debbugs.gnu.org
Subject: Re: bug#21471: 25.0.50; bug report with text from Info has spurious
 escape chars
Date: Mon, 14 Sep 2015 09:38:29 -0700
[Message part 1 (text/plain, inline)]
It is a longstanding double-encoding bug in mailclient-encode-string-as-url, and 
I installed the attached attempt to fix it.  Please give this a try.  I am 
boldly marking the bug as fixed.

I expect our more-extensive use of curved quotes to shake out other bugs like 
this in Emacs, and it is a good thing to fix them.
[0001-Don-t-double-encode-non-ASCII-for-mail-client.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Mon, 14 Sep 2015 18:21:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 21471 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#21471: 25.0.50;
 bug report with text from Info has spurious escape chars
Date: Mon, 14 Sep 2015 21:20:05 +0300
> Cc: 21471-done <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Mon, 14 Sep 2015 09:38:29 -0700
> 
> It is a longstanding double-encoding bug in mailclient-encode-string-as-url, and 
> I installed the attached attempt to fix it.  Please give this a try.  I am 
> boldly marking the bug as fixed.

What was this fix supposed to change?  I still see quoted-printable
encoding of non-ASCII characters in the text pasted from the clipboard
into a mail client.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Mon, 14 Sep 2015 21:11:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 21471 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#21471: 25.0.50; bug report with text from Info has spurious
 escape chars
Date: Mon, 14 Sep 2015 14:10:51 -0700
[Message part 1 (text/plain, inline)]
Eli Zaretskii wrote:
> What was this fix supposed to change?

It was supposed to fix the two scenarios mentioned (one mine, the other Drew's). 
 I didn't know the clipboard didn't work.  Fixed, I hope, with the attached patch.
[0001-Don-t-double-encode-non-ASCII-mail-clipboard.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21471; Package emacs. (Tue, 15 Sep 2015 06:58:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 21471 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#21471: 25.0.50;
 bug report with text from Info has spurious escape chars
Date: Tue, 15 Sep 2015 09:56:36 +0300
> Cc: drew.adams <at> oracle.com, 21471 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Mon, 14 Sep 2015 14:10:51 -0700
> 
>   I didn't know the clipboard didn't work.  Fixed, I hope, with the attached patch.

Works here, thanks.




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

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 04 Aug 2016 15:36:01 GMT) Full text and rfc822 format available.

Forcibly Merged 21471 24152. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 04 Aug 2016 15:36:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 02 Sep 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 354 days ago.

Previous Next


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