[Top][All Lists]

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

Re: Change of Lisp syntax for "fancy" quotes in Emacs 27?

From: Alan Mackenzie
Subject: Re: Change of Lisp syntax for "fancy" quotes in Emacs 27?
Date: Sun, 4 Feb 2018 11:15:50 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Michael.

On Sun, Feb 04, 2018 at 02:16:52 +0100, Michael Heerdegen wrote:
> Hello,

> Helpfulness of error messages surely depends on the beholder, and on
> expectations.  In my eyes,

> > Symbol's value as variable is void: 'аbbrevs-changed

> is quite clear: you think this        ^^^^^^^^^^^^^^^^ is a quoted
> thing, but the error message calls it a symbol.  So there must be a
> problem with that quote, it has obviously gotten read as part of the
> symbol.  Sure, you have still to find out why.  OTOH

This has actually happened to me.  In the error message, I didn't see
the quote as part of the symbol, I subconsciously dismissed it as a
quoting convention in the error message.  So what my brain saw was

    Symbol's value as variable is void: abbrevs-changed

.  This puzzled me a long time.

> > >   (invalid-read-syntax "strange quote" "’")

> also doesn't say what's wrong with that quote.  It even calls something
> a quote where there is none.

Perhaps "strange quasi quote" would be more emphatic and clearer.

> The error message is confusing.  Repeating the pseudo quote character
> in the error message doesn't make it look less like a quote.

Agreed, on both points.

> > I think you are so eager to make your point that you are willing to
> > claim that black is white and vice versa.  Any objective person would
> > agree that the new error message is more directly pointing to the root
> > cause

> Are you really sure that every Emacs user would expect that we modify
> the Lisp reader to catch typos?

We're not talking about typos here.  The curly quotes aren't present on
typical keyboard layouts (though I'm informed they are present on
Finnish keyboards), so nobody who isn't Finnish will type one of these
characters by accident.  We're talking about Emacs itself corrupting
ASCII quotes into curly quotes in a `message' call because of the
default setting of `text-quoting-style', and so on.

Because of this, the error message should concentrate on that quote, not
the strange symbol, which Emacs itself created.

[ .... ]

> > Symbol's value as variable is void: 'аbbrevs-changed.

> Misusing something fundamental as the Lisp reader to catch such stuff
> should be the very last resort.  The result can get much more confusing
> in situations we now don't think about.

Maybe we're already at the last resort for this problem.  Or maybe not.
Maybe an error message for unknown symbols should check for them
beginning with a curly quote.

> > > Lisp doesn't have a bug here.
> > That's a strawman, and you know it.  We are talking about diagnostics
> > for bugs in Lisp programs.

> I think it's a eligible argument.  Drew just thinks it's the wrong fix.
> He may also think that no fix would maybe suffice.  That's ok, and I
> think he made some good points.

> We should discuss about alternative approaches to move forward.  People
> often paste stuff into scratch or the M-: prompt that they copied from
> elsewhere.  Maybe we could make M-: and C-x C-e check for this problem.
> These could also check for other, similar frequent problems.  Any better
> suggestions?

I think that's a good suggestion.

> Michael.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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