unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: eggert@cs.ucla.edu, 23425@debbugs.gnu.org
Subject: bug#23425: master branch: `message' wrongly corrupts ' to curly quote.
Date: Tue, 03 May 2016 19:55:45 +0300	[thread overview]
Message-ID: <831t5jkrn2.fsf@gnu.org> (raw)
In-Reply-To: <20160503162716.GB11330@acm.fritz.box> (message from Alan Mackenzie on Tue, 3 May 2016 16:27:16 +0000)

> Date: Tue, 3 May 2016 16:27:16 +0000
> Cc: eggert@cs.ucla.edu, 23425@debbugs.gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> > >     (message "%s" (format "......." .....))
> 
> > > , which is ridiculous.
> 
> > I don't see it as ridiculous.  You'd have similar problems (and use
> > the same solution) if the string produced by 'format' included %
> > characters, right?
> 
> I suppose so.  Have you got anything agains me putting that suggestion
> into etc/NEWS, in the entry for `message'?

No, I have nothing against that.

> > >      In a format string containing single quotes, curved quotes `like
> > >      this' and grave quotes `like this' work better than straight
> > >      quotes 'like this', as `message' typically formats every straight
> > >      quote as a curved closing quote.
> > > [...]
> > > Why is there no clear definition of what is meant by the confusing terms
> > > "single quotes", "grave quotes", and "straight quotes"?
> 
> > Not sure what you mean: AFAICT, the definition is right there in the
> > text you cited.
> 
> Only in the form of characters I can't distinguish on my terminal, and
> couldn't even if they were distinct due to my failing eyesight ;-).  And
> not in the form I would need to be able to program with them, such as
> their ASCII/UTF-8 codes.

Well, a picture is worth about a thousand words.  I very much doubt
one could explain that clearly enough, if we assume the characters are
not displayed correctly and that the user isn't already familiar with
the terminology.  How do you "define" character by just talking about
them, without showing their glyphs??

> > > Why is there no mention of `text-quoting-style' on this page?
> 
> > Because we don't want to advertise it too much.  It is supposed to be
> > a kind of "fire escape", not something users must routinely do.  If
> > that assumption is wrong, then having this prominently mentioned in
> > the manual will be the least of our troubles.
> 
> If I need to output source code using `message', I will need to bind
> `text-quoting-style' to a sensible value, won't I?

No, you just need to use "%s" as the first argument, that's all.

> And why is it something that users shouldn't routinely do?

Because the theory behind this change is that everyone will want that,
certainly after they get used to it a little.  If that theory is
wrong, we will have to change much more than just document that
variable or teach users to use it more.

> Surely it should be a configuration variable.  Some people, like me,
> don't like being lied to by a computer program.

You are not being lied to.  Just think of ` and ' as yet another
format specifier character, not unlike %.

> > > How do I configure my Emacs so that `message' behaves properly?
> 
> > I urge you not to do that.  Because if you do, problems like this one
> > will slip unnoticed, instead of being fixed in the code.
> 
> I'd like it to be fixed in the code.  :-)

You mean, disable the conversion?  Not going to happen before 25.1,
and unless there's a user outcry, not going to happen, period.

That's why I think we should use the default, and find and fix any
leftovers like the one which started this discussion.

> > > Properly, for me, means that it handles percent escape sequences, AND
> > > OTHERWISE LEAVES THE STRING UNCHANGED.  Why is this information not in
> > > the manual and the doc string?
> 
> > AFAICT, 'grave' is that value.  And it is documented.
> 
> No, `grave' doesn't work.  This changes curly quotes to ASCII quotes, i.e.
> it distorts the input and loses information.

??? Are we talking about the same issue?

  emacs -Q
  M-: (setq text-quoting-style 'grave) RET
  M-: (message "`this'") RET => `this'

What am I missing?

> > > Why is it not in the section "incompatible Lisp changes"?
> 
> > Because it isn't.  If this is an incompatible change, then every new
> > features that changes behavior is also an incompatible change.
> 
> No.  This particular change causes previously working lisp code (such as
> my function from yesterday) to stop working.

Like any other change can.

> > > How do I restore the old behaviour of `message'?
> 
> > By setting text-quoting-style.  But again, please don't.
> 
> I want my Emacs to deliver messages to me as they were intended by the
> people who wrote them.  I have a visceral disgust of and hate for this
> distortion of strings caused by this translation of quotes.  I'm sure I'm
> not the only person who feels like this (and indeed, there were
> snide/sarcastic remarks on this list yesterday in my support).

You are not just anyone.  You are a core developer and a maintainer of
several important packages.  That is a responsibility that places an
onus on us to "suffer" a little so that bugs will be detected and
fixed sooner rather than latter.  In general, developers should try
using as many defaults as they can, for that very reason -- to see the
problems that users will as soon as possible.

If you still don't want that, I cannot force you.  It's just that
there's so few of us that every single one counts.

> > > Can we please fix this before Emacs 25.1 gets released?
> 
> > What fix would you like to see?  I'm not sure I understand.
> 
> I want there to be an additional value `leave' for `text-quoting-style'
> which would suppress all substitution of quotes.

See above: I'm missing something here, because I don't understand why
is that needed.





  reply	other threads:[~2016-05-03 16:55 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02 14:55 bug#23425: master branch: `message' wrongly corrupts ' to curly quote Alan Mackenzie
2016-05-02 16:25 ` Lars Ingebrigtsen
2016-05-02 16:41   ` Drew Adams
2016-05-02 17:53 ` Paul Eggert
2016-05-02 19:10   ` Alan Mackenzie
2016-05-03 15:17     ` Paul Eggert
2016-05-03 16:36       ` Drew Adams
2016-05-03 16:59         ` Eli Zaretskii
2016-05-03 15:38     ` Eli Zaretskii
2016-05-03 16:27       ` Alan Mackenzie
2016-05-03 16:55         ` Eli Zaretskii [this message]
2016-05-03 20:03           ` Alan Mackenzie
2016-05-03 20:49             ` Paul Eggert
2016-05-04 15:32             ` Eli Zaretskii
2016-05-04 16:48               ` Alan Mackenzie
2016-05-04 17:03                 ` Eli Zaretskii
2016-05-04 17:37                   ` Josh
2016-05-04 19:05                     ` Eli Zaretskii
2016-05-04 18:04                   ` Alan Mackenzie
2016-05-04 18:39                     ` Paul Eggert
2016-05-04 18:57                       ` Alan Mackenzie
2016-05-04 19:02                         ` John Wiegley
2016-05-04 21:34                         ` Paul Eggert
2016-05-04 21:50                         ` Paul Eggert
2016-05-04 23:49                       ` Paul Eggert
2016-05-05 15:51                         ` Eli Zaretskii
2016-05-10 14:41                           ` Paul Eggert
2017-05-31  1:07                             ` Glenn Morris
2017-05-31  1:42                               ` Paul Eggert
2017-05-31 21:24                                 ` Alan Mackenzie
2017-05-31 23:26                                   ` Paul Eggert
2017-06-02 21:02                                     ` Alan Mackenzie
2017-06-02 21:15                                       ` Dmitry Gutov
2017-06-03 21:10                                         ` Alan Mackenzie
     [not found]                                         ` <20170603211010.GD2130@acm.fritz.box>
2017-06-03 21:32                                           ` Dmitry Gutov
2017-06-02 21:47                                       ` Paul Eggert
2017-06-03  0:13                                         ` Glenn Morris
2017-06-03 21:01                                           ` Alan Mackenzie
2017-06-03 20:53                                         ` Alan Mackenzie
     [not found]                                         ` <20170603205331.GA2130@acm.fritz.box>
2017-06-04 21:01                                           ` Paul Eggert
2017-06-05 16:27                                             ` Alan Mackenzie
     [not found]                                             ` <20170605162737.GA30946@acm.fritz.box>
2017-06-05 18:19                                               ` Paul Eggert
     [not found]                                               ` <ac90b979-6a37-29c4-03b3-6322ac2cc11a@cs.ucla.edu>
2017-06-05 18:31                                                 ` Andreas Schwab
2017-06-05 20:37                                                 ` Alan Mackenzie
     [not found]                                                 ` <20170605203753.GB30946@acm.fritz.box>
2017-06-05 21:05                                                   ` Clément Pit-Claudel
2017-06-07 16:50                                                     ` Alan Mackenzie
2017-06-07 19:29                                                       ` Clément Pit-Claudel
2017-06-06  0:14                                                   ` Paul Eggert
2017-06-06  8:21                                                     ` Andreas Schwab
     [not found]                                                     ` <mvmtw3tsf05.fsf@suse.de>
2017-06-06 12:24                                                       ` Clément Pit-Claudel
     [not found]                                                       ` <fa92f34f-982b-e9a5-be21-188e694e38d9@gmail.com>
2017-06-06 13:55                                                         ` Yuri Khan
     [not found]                                                         ` <CAP_d_8X7V_G4g7emn_EPd_YYPKu2HfnDE+Q3FOPMGXpB4sEYSw@mail.gmail.com>
2017-06-06 18:21                                                           ` Clément Pit-Claudel
2017-06-06 18:59                                                             ` Yuri Khan
     [not found]                                                             ` <CAP_d_8X5OBsQQ=0+dj-qYFV3yEC4WZVMpyRw1KyiM0tvJUNFMw@mail.gmail.com>
2017-06-06 19:39                                                               ` Clément Pit-Claudel
     [not found]                                                               ` <10515b89-1c60-227e-ff3d-3127f59c0daf@gmail.com>
2017-06-07  4:57                                                                 ` Eli Zaretskii
2017-06-06 23:09                                                       ` Paul Eggert
2017-06-07  7:44                                                         ` Andreas Schwab
2017-06-07 18:17                                                           ` Paul Eggert
2017-06-08  8:04                                                             ` Andreas Schwab
2017-06-07 13:27                                                         ` Drew Adams
2017-06-07 19:13                                                     ` Alan Mackenzie
2017-06-07 19:27                                                       ` Clément Pit-Claudel
     [not found]                                                       ` <966db090-4aa1-231c-ef5a-370ece8905d1@gmail.com>
2017-06-07 19:33                                                         ` Dmitry Gutov
2017-06-07 19:51                                                         ` Alan Mackenzie
2017-06-07 20:33                                                         ` Alan Mackenzie
2017-06-07 23:28                                                       ` Paul Eggert
2017-06-08 17:34                                                         ` Alan Mackenzie
2017-06-08 20:17                                                           ` Paul Eggert
2017-06-09 19:41                                                             ` Alan Mackenzie
2017-06-09 20:17                                                               ` Drew Adams
2017-06-09 20:38                                                                 ` Alan Mackenzie
2017-06-09 21:05                                                                   ` Drew Adams
2017-06-09 21:44                                                               ` Paul Eggert
2017-06-09 22:51                                                                 ` Drew Adams
2017-06-10  0:20                                                                   ` Paul Eggert
2017-06-10 10:01                                                                     ` Alan Mackenzie
2017-06-10 10:52                                                                       ` David Engster
2017-06-10 11:48                                                                         ` Eli Zaretskii
2017-06-10 13:01                                                                         ` Alan Mackenzie
2017-06-10 13:39                                                                           ` Eli Zaretskii
2017-06-11 10:03                                                                             ` Alan Mackenzie
2017-06-11 14:37                                                                               ` Eli Zaretskii
2017-06-10 15:28                                                                           ` Dmitry Gutov
2017-06-01 16:56                                   ` Glenn Morris
2017-06-03 21:07                                     ` Alan Mackenzie
2016-05-04 18:46                     ` John Wiegley
2016-05-04 20:23                       ` Dmitry Gutov
2016-05-04 21:15                         ` John Wiegley
2016-05-04 22:19                           ` Lars Ingebrigtsen
2016-05-05  7:12                             ` Andreas Schwab
2016-05-05 17:05                         ` Eli Zaretskii
2016-05-05  8:06                       ` Alan Mackenzie
2016-05-05 17:06                       ` Eli Zaretskii
2016-05-05 23:46                         ` John Wiegley
2016-05-06  8:54                         ` Nicolas Petton
2016-05-04 19:08                     ` Eli Zaretskii
2016-05-04 21:49               ` Andreas Schwab
2017-06-09 20:31 ` Glenn Morris
2017-06-10  7:08   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831t5jkrn2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23425@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).