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

From: Alan Mackenzie <[email-masked]>
Date: Tue, 3 May 2016 20:03:30 +0000

Hello, Eli.

On Tue, May 03, 2016 at 07:55:45PM +0300, Eli Zaretskii wrote:
> > Date: Tue, 3 May 2016 16:27:16 +0000
> > Cc: [email-masked], [email-masked]
> > From: Alan Mackenzie <[email-masked]>

> > I suppose so.  Have you got anything agains me putting that
> > suggestion [ the trick of using `format' inside `message] into
> > etc/NEWS, in the entry for `message'?

> No, I have nothing against that.

OK, I'll do that later.

> > > 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??

This isn't simple.  I think what's needed is a clear explanation of the
conversion process, not merely the result of using it - I'm still a
little confused over whether a left ASCII quote (`) might get converted
into a right ASCII or curly quote.  (A little later - yes it can happen)
I don't think that is clearly documented anywhere.

> > > > 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.

> > 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.

That seems a very strange attitude from an Emacs developer - that one
developer's personal preferences should be imposed on all Emacs users
without the possibility of disabling by configuration.

It is quite clear from posts in emacs-devel and bug-gnu-emacs over the
last year or so that NOT EVERYBODY wants these curly quote changes.  Far
from it.  Just like not everybody wants light text on a dark background,
or (thinking back to Emacs 21) not everybody wants fringes on their GUI
screen.  Users were complaining for years about the unconfigurable
fringes, until Emacs 22 was released.

> If that theory is wrong, we will have to change much more than just
> document that variable or teach users to use it more.

That theory _is_ wrong, certainly amongst Emacs developers.  Even in this
bug thread, two other people have expressed negative sentiments about
this matter.

> > 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 %.

They're not - they're literal characters.  The quote which should have
been output yesterday afternoon, but got corrupted, was certainly a
literal quote.

> > > 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.

No, I mean make this conversion optional and configurable, as in the
patch in my last post.

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

This particular default just makes me too angry to get work done.  I'm
still using 24.5.  After becoming tired out in the fight over curly
quotes last summer/autumn, I just left that task to other people.  I
assumed that the matter of curly quotes had been sorted out
satisfactorally.

[ .... ]

> > 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?

That in that scenario, (message "`this'") ; with curly quotes
gets converted to "`this'" ; with ASCII quotes.  This is not wanted.

[ .... ]

> > > > 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.

Backwards compatibility, perhaps?

Another reason is the difficulty of discovering from the available
documentation, which is not concise and coherent[*], precisely what the
quote substitution does.  At least on disabling the substitution, you
know where you stand.

[*] There is nowhere any text like "when `message' runs, it subtitutes
ASCII and curly quotes as follow: ....".

-- 
Alan Mackenzie (Nuremberg, Germany).