[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Eli Zaretskii
Subject: bug#23425: master branch: `message' wrongly corrupts ' to curly quote.
Date: Tue, 03 May 2016 19:55:45 +0300

> Date: Tue, 3 May 2016 16:27:16 +0000
> Cc: address@hidden, address@hidden
> From: Alan Mackenzie <address@hidden>
> > >     (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 via email to

[Prev in Thread] Current Thread [Next in Thread]