unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
Cc: Glenn Morris <rgm@gnu.org>, 23425@debbugs.gnu.org
Subject: Re: bug#23425: master branch: `message' wrongly corrupts ' to curly quote.
Date: Sat, 3 Jun 2017 20:53:31 +0000	[thread overview]
Message-ID: <20170603205331.GA2130@acm.fritz.box> (raw)
In-Reply-To: <11c0adfb-7fdd-8d28-1a47-869e3e7043ea@cs.ucla.edu>

[ Message posted to emacs-devel@gnu.org, with Reply-To: set. ]

Hello, Paul.

On Fri, Jun 02, 2017 at 14:47:42 -0700, Paul Eggert wrote:
> On 06/02/2017 02:02 PM, Alan Mackenzie wrote:
> > How about transferring this discussion to emacs-devel, so that more
> > people would be able to see it.

> We had that discussion there already, and I doubt whether it’d be 
> worthwhile to repeat it. Of course you're free to take it there again if 
> you like.

The previous discussion was abruptly cut short, without reaching a
conclusion, with a "we're too close to a release to change anything
now".  This came with the implicit understanding the discussion could be
countinued after the release.

> > The default behaviour has been changed already, and that change has
> > caused problems and will cause further problems.

> I expect that most of the practical problems have been shaken out 
> already with the changes published in Emacs 25.1 last year, so that most 
> of this cost has already been paid.

They have not.  We have moved from a state where everybody knew what
`message' did (in Emacs 24), to one with wild special characters which
only apply sometimes, and necessitate crazy prolix formulations to work
around unwanted translations of quote characters.

`message' is currently broken.

Introducing quote translation has introduced a burden on all users of
`message'.  Seeing how poisonous and insidious this translation can be,
it makes sense to shift this burden over to the use cases where the
programmers need quote translation, and hence will be aware of it.

> > I propose restoring the default to what it was in Emacs 24.  For
> > simplicity's sake, only % should be special, and for translating quotes
> > we could introduce %' and %`, such that quote translation happens only
> > when a %' or %` is present.

> That kind of approach was proposed way back when. It doesn’t address 
> quotes in doc strings, though.

Of course it doesn't.  Doc strings have their own peculiar quoting
mechanisms which are disjoint from those of `message'.

> More generally, a problem with this sort of approach is that although
> it simplifies ‘message’ (obviously), this is at the price of
> complicating everything else.

What is the "everything else" that gets thus complicated?  I don't see
anything else getting more complicated.

> I estimate we’d need to change 10,000 lines of Emacs source code to
> make that change to ‘message’. (This is a just a quick estimate based
> on ‘grep '".*`.*"'’.) The resulting source code would typically be a
> bit harder to read than it is now.

I think this estimate is way over the mark.  There are around 17,000
occurrances of "message" in our Lisp sources, and probably a few in our
C sources.  Only (some of) those containing the quote characters in the
format string would need amendment.  These will comprise a tiny portion
of these ~17,000, and can be found easily enough with a script.

-- 
Alan Mackenzie (Nuremberg, Germany).



       reply	other threads:[~2017-06-03 20:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <83d1p1iwls.fsf@gnu.org>
     [not found] ` <20160504180417.GB31717@acm.fritz.box>
     [not found]   ` <4019c1e5-36b4-745f-b299-16b074bff81e@cs.ucla.edu>
     [not found]     ` <b6310cb1-184c-8643-cced-1c25a7c13d5a@cs.ucla.edu>
     [not found]       ` <83zis4h59w.fsf@gnu.org>
     [not found]         ` <51a2ae75-71f7-10f6-ae2a-7c830bdf0a30@cs.ucla.edu>
     [not found]           ` <ux37blx2a2.fsf@fencepost.gnu.org>
     [not found]             ` <17c1c00d-a275-5e61-0c47-6872a64a9347@cs.ucla.edu>
     [not found]               ` <20170531212452.GA3789@acm.fritz.box>
     [not found]                 ` <07bf5f9d-e8cd-a4d9-1843-b488bfe0b92c@cs.ucla.edu>
     [not found]                   ` <20170602210209.GA3570@acm.fritz.box>
     [not found]                     ` <11c0adfb-7fdd-8d28-1a47-869e3e7043ea@cs.ucla.edu>
2017-06-03 20:53                       ` Alan Mackenzie [this message]
2017-06-04 21:01                         ` bug#23425: master branch: `message' wrongly corrupts ' to curly quote Paul Eggert
2017-06-05 16:27                           ` Alan Mackenzie
2017-06-05 18:19                             ` Paul Eggert
2017-06-05 18:31                               ` Andreas Schwab
2017-06-05 20:37                               ` Alan Mackenzie
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
2017-06-06 12:24                                     ` Clément Pit-Claudel
2017-06-06 13:55                                       ` Yuri Khan
2017-06-06 18:21                                         ` Clément Pit-Claudel
2017-06-06 18:59                                           ` Yuri Khan
2017-06-06 19:39                                             ` Clément Pit-Claudel
2017-06-07  4:57                                               ` Eli Zaretskii
2017-06-06 23:09                                     ` Paul Eggert
2017-06-07  7:44                                       ` 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
2017-06-07 19:33                                       ` Dmitry Gutov
2017-06-07 19:51                                       ` Alan Mackenzie
2017-06-07 20:33                                       ` Alan Mackenzie
2017-06-07 20:56                                         ` Drew Adams
2017-06-07 22:05                                           ` `message' with quotes [was: bug#23425: `message' wrongly corrupts ' to curly quote] Drew Adams
2017-06-08 17:49                                             ` Alan Mackenzie
     [not found]                       ` <73poemlyhp.fsf@fencepost.gnu.org>
2017-06-03 21:01                         ` bug#23425: master branch: `message' wrongly corrupts ' to curly quote Alan Mackenzie
     [not found]                     ` <a874cfc4-8810-a981-6228-83a3b6c703e8@yandex.ru>
2017-06-03 21:10                       ` Alan Mackenzie
2017-06-03 21:32                         ` Dmitry Gutov
     [not found]                 ` <kur2z38x5m.fsf@fencepost.gnu.org>
2017-06-03 21:07                   ` Alan Mackenzie

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=20170603205331.GA2130@acm.fritz.box \
    --to=acm@muc.de \
    --cc=23425@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    /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).