[Top][All Lists]

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

RE: Why "symbol's value" error about a list?

From: Drew Adams
Subject: RE: Why "symbol's value" error about a list?
Date: Tue, 6 Feb 2018 07:45:59 -0800 (PST)

> It seems there are two issues here - they are not completely
> separate, but do seem to be distinct and probably need to be
> addressed in two steps. 
> If the statement 
> > Count me as one of those "some of us".  Echoing Lisp code
> > should do just that - no fiddling to "prettify" apostrophe to
> > curly quote etc.
> is correct, then I would agree it was a bad design decision.
> The *Messages* buffer should display lisp code exactly as it
> is read and not try to 'prettify' it.


> The second issue seems to be more about how to make the error
> message more informative.

Yes, but it's not just about that error message.  That Lisp
error is about an undefined variable.  But there are plenty
of other contexts where users can be confused by such a

If code or a user did in fact define a variable named ’bar
then there would be no Lisp error (prior to the recent change).

Such a symbol name could nevertheless be confusing in some
contexts.  But it's not about how best to present that
undefined-variable error message.

That message was telling the truth, even if in the particular
context presented it might not be immediately clear to a user
what the undefined symbol name is (i.e., that the name contains
a curly quote).

> I suspect this is a much harder problem to resolve. I don't
> know what the right solution is for that, but I do know that
> I would have more chance of recognising my error if the
> message displayed in the buffer displays the lisp code
> exactly as it was read by the reader.


That Lisp error really is about using symbol `’bar' as
a variable.  Such code can exist in different contexts,
only some of which have anything to do with a user
mistaking a curly quote for an apostrophe.

Just as some Lisp code can mistakenly use symbol `abc'
as a variable apart from any binding of it as a variable,
and so provoking the undefined-variable error, so can
code mistakenly use symbol `’bar' as an undefined variable.

Such a context would have nothing to do with the newly
fabricated error (invalid-read-syntax "strange quote" "’").
That's just the wrong error for Lisp to raise here.

reply via email to

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