Subject: Re: master branch: `message' wrongly corrupts ' to curly quote.

From: Alan Mackenzie <[email-masked]>
Date: Mon, 2 May 2016 19:10:31 +0000

Hello, Paul.

On Mon, May 02, 2016 at 10:53:59AM -0700, Paul Eggert wrote:
> (message "%s" M) is the usual way to output a message M without 
> formatting it, and something like this is needed anyway if M might 
> contain %.

That is the case for a string that might contain percent characters.  It
is not the case for a string known to be without percents.

> Accordingly, I installed the attached patch into the emacs-25 
> branch and merged the result to master.

That is merely tinkering with the symptoms of the problem.  The actual
problem is that `message' corrupts strings.

> I had already adjusted some other instances of calls to ‘message’ (to
> fix problems with % as well as with quotes) but missed this call;
> sorry about that.

There was nothing wrong with `c-replay-parse-state-state'; it used
`message' as documented.  Your change implies that your workaround for
`message''s problems is instead to write something like:

    (message "%s" (format "......." .....))

, which is ridiculous.

> The behavior of ‘message’ is documented in the manual, in doc strings, 

It is not.  There is no mention of its corruption of quotes in
`messages''s doc string.  In the Elisp manual there is just the
following obscure, and somewhat patronising, paragraph:

     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.

Curved quotes do not "work better" than straight quotes, as my
experience this afternoon demonstrates.  Why are readers insulted with
"formats"?  There is no "formatting" going on here; instead some
characters are being expunged, and substituted by other characters.  Why
is the most important idea in that paragraph, this substitution, slid in
as though it was a totally natural thing to do, scarcely worth a
mention?

Why is there no clear definition of what is meant by the confusing terms
"single quotes", "grave quotes", and "straight quotes"?

It appears to me that these substitutions are only done on pairs of
quote marks, not single quotes.  If I'm right, why is this not
documented?

Why is there no mention of `text-quoting-style' on this page?

How do I configure my Emacs so that `message' behaves properly?
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?

> and the quoting change in Emacs 25 is documented in etc/NEWS, so it is 
> not a bug per se.

Why is it not in the section "incompatible Lisp changes"?

How do I restore the old behaviour of `message'?  This information
surely belongs in etc/NEWS.  As far as I can make out, there is no
setting of `text-quoting-style' equivalent to "do nothing".  Why not?
Not everybody want to "text-quote".

Over the months, I've lost a ridiculously large amount of time to these
curly quotes.  I never want to see them again (even though I'm forced to
in precompiled info files).  Please document how to expunge them.

Can we please fix this before Emacs 25.1 gets released?  Otherwise these
problems will impact LOTS of users.

-- 
Alan Mackenzie (Nuremberg, Germany).