From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: acm@muc.de, emacs-devel@gnu.org, rms@gnu.org,
npostavs@users.sourceforge.net
Subject: Re: Why "symbol's value" error about a list?
Date: Tue, 06 Feb 2018 21:17:08 +0200 [thread overview]
Message-ID: <83inba6i8b.fsf@gnu.org> (raw)
In-Reply-To: <79ef00e3-bf72-4944-a563-35c87e634e3f@default> (message from Drew Adams on Tue, 6 Feb 2018 07:45:55 -0800 (PST))
> Date: Tue, 6 Feb 2018 07:45:55 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: acm@muc.de, rms@gnu.org, npostavs@users.sourceforge.net,
> emacs-devel@gnu.org
>
> > > > The error message given out is:
> > > > Symbol's value as variable is void: ’bar
> > >
> > > That was the old, and legitimate, error message, yes. It
> > > accurately describes what is really going on (as you describe
> > > well, below).
> > >
> > > Now the message is instead (invalid-read-syntax "strange quote"
> > > "’"). Is that better?
> >
> > I think it's somewhat better, because it talks about "strange quote",
> > which is a hint for the user about the actual problem.
>
> The actual problem is the use of a non-variable symbol
> as a variable.
That's one possibility, yes. But a much more probable possibility is
that the user mistyped the quote, either because she copy/pasted it
from some text, or because she turned on the Electric Quote mode, or
for some other reason.
A useful error message should consider this latter probable cause and
help the user correct it, if indeed that was the reason. Many tools
do similar second-guessing for frequent mistakes. For example. GNU
Make detects when a line in a Makefile starts with 8 SPC characters
instead of a mandatory TAB, and says:
*** missing separator (did you mean TAB instead of 8 spaces?).
The first part is the "dumb" error message, based on the syntax error,
the part in parentheses is a helpful hint for the user, based on many
such user errors seen in the past.
Latest versions of GCC also provide similar hints.
> You've just made it necessary now to escape that curly quote when
> defining and using the symbol:
You are changing the subject. I just wrote that an error message
which mentions "strange quotes" is somewhat better than one which just
states the syntax error. I said nothing about anything else.
> > > Symbol's value as variable is void: `’bar'
> >
> > That might make things even more confusing, because the text actually
> > displayed will be this:
> > Symbol’s value as variable is void: ‘’bar’
> > which loses all hints of what is being quoted here.
>
> I wrote `’bar'.
Yes, but the Lisp function 'message' has its own ideas regarding
quoting text, as you well know. Try evaluating this:
(message "Symbol's value as variable is void: `%s'" "’bar")
> > That ship has sailed two Emacs releases ago. We are trying to
> > fix the fallout.
>
> Two releases ago and still reaping the fallout rewards...
> Time to call back that ship or try to redirect it?
You can try fighting this Quixotic battle on and on, but I don't
recommend that.
> You've introduced Lisp read errors where there were
> none.
No, I didn't do anything of the kind.
> > > Should this Lisp syntax change be reverted? That's the
> > > question being discussed here.
> >
> > No, that's only part of the question. The other, no less important
> > part is if we revert that change, how to make the confusing error
> > message less so and more helpful in understanding the user error.
>
> Agreed. The first step is to revert the change in Lisp
> syntax. The second step is to design aids for users to
> recognize such gotchas.
I think both steps should be made together, otherwise we would be
making a change for the worse.
next prev parent reply other threads:[~2018-02-06 19:17 UTC|newest]
Thread overview: 98+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 22:24 Change of Lisp syntax for "fancy" quotes in Emacs 27? Noam Postavsky
2018-02-02 22:52 ` Paul Eggert
2018-02-03 0:00 ` Drew Adams
2018-02-03 0:09 ` Paul Eggert
2018-02-03 0:39 ` Drew Adams
2018-02-03 8:33 ` Eli Zaretskii
2018-02-03 16:16 ` Drew Adams
2018-02-03 17:05 ` Eli Zaretskii
2018-02-04 1:16 ` Michael Heerdegen
2018-02-04 1:25 ` Clément Pit-Claudel
2018-02-04 2:05 ` Drew Adams
2018-02-04 2:06 ` Michael Heerdegen
2018-02-04 10:34 ` Alan Third
2018-02-04 15:36 ` Clément Pit-Claudel
2018-02-04 17:37 ` Eli Zaretskii
2018-02-04 21:31 ` Noam Postavsky
2018-02-04 11:15 ` Alan Mackenzie
2018-02-04 15:54 ` Drew Adams
2018-02-04 14:47 ` Noam Postavsky
2018-02-04 1:55 ` Drew Adams
2018-02-04 2:10 ` Noam Postavsky
2018-02-05 1:06 ` Why "symbol's value" error about a list? Richard Stallman
2018-02-05 20:35 ` Alan Mackenzie
2018-02-05 21:46 ` Drew Adams
2018-02-06 4:13 ` Eli Zaretskii
2018-02-06 7:32 ` Tim Cross
2018-02-06 7:40 ` Eli Zaretskii
2018-02-06 15:45 ` Drew Adams
2018-02-06 15:45 ` Drew Adams
2018-02-06 19:17 ` Eli Zaretskii [this message]
2018-02-06 14:51 ` Richard Stallman
2018-02-06 11:27 ` Noam Postavsky
2018-02-06 14:53 ` Richard Stallman
2018-02-06 18:59 ` Eli Zaretskii
2018-02-07 2:40 ` Richard Stallman
2018-02-07 3:42 ` Eli Zaretskii
2018-02-06 18:52 ` Eli Zaretskii
2018-02-05 1:06 ` Change of Lisp syntax for "fancy" quotes in Emacs 27? Richard Stallman
2018-02-03 18:13 ` Aaron Ecay
2018-02-04 2:05 ` Drew Adams
2018-02-04 4:51 ` Paul Eggert
2018-02-04 9:47 ` Andreas Schwab
2018-02-04 15:04 ` Noam Postavsky
2018-02-04 17:33 ` Eli Zaretskii
2018-02-04 19:36 ` Paul Eggert
2018-02-04 19:55 ` Philipp Stephani
2018-02-04 20:10 ` Eli Zaretskii
2018-02-04 20:36 ` Eli Zaretskii
2018-02-04 20:48 ` Paul Eggert
2018-02-04 20:59 ` Clément Pit-Claudel
2018-10-05 0:03 ` Noam Postavsky
2018-10-05 1:01 ` Paul Eggert
2018-10-05 8:43 ` Eli Zaretskii
2018-10-05 23:02 ` Paul Eggert
2018-10-06 0:20 ` Drew Adams
2018-10-06 9:14 ` Alan Mackenzie
2018-10-06 14:34 ` Stefan Monnier
2018-10-06 14:57 ` Drew Adams
2018-10-06 15:42 ` Garreau, Alexandre
2018-10-06 16:10 ` Paul Eggert
2018-10-06 16:17 ` Paul Eggert
2018-10-07 1:13 ` Drew Adams
2018-10-08 3:51 ` Richard Stallman
2018-10-06 10:11 ` Eli Zaretskii
2018-10-06 15:51 ` Paul Eggert
2018-10-06 16:45 ` Eli Zaretskii
2018-10-06 18:03 ` Paul Eggert
2018-10-06 18:29 ` Eli Zaretskii
2018-10-06 19:18 ` Paul Eggert
2018-10-06 19:30 ` Paul Eggert
2018-10-06 19:32 ` Garreau, Alexandre
2018-10-06 11:22 ` Garreau, Alexandre
2018-10-06 11:50 ` Eli Zaretskii
2018-10-06 12:10 ` Garreau, Alexandre
2018-10-06 14:00 ` Eli Zaretskii
2018-10-24 22:25 ` Noam Postavsky
2018-10-06 13:15 ` Unicode security-issues workarounds elsewhere [Was: Re: Change of Lisp syntax for "fancy" quotes in Emacs 27?] Garreau, Alexandre
2018-10-06 14:01 ` Eli Zaretskii
2018-10-06 16:24 ` Change of Lisp syntax for "fancy" quotes in Emacs 27? Paul Eggert
2018-10-06 16:40 ` Stefan Monnier
2018-10-09 14:43 ` Noam Postavsky
2018-10-09 15:30 ` Paul Eggert
2018-10-09 16:13 ` Eli Zaretskii
2018-10-09 17:07 ` Paul Eggert
2018-10-09 19:18 ` Andreas Schwab
2018-10-10 9:39 ` Aaron Ecay
2018-10-10 11:18 ` Garreau, Alexandre
2018-10-10 14:31 ` Eli Zaretskii
2018-10-10 15:18 ` Eli Zaretskii
2018-10-10 15:43 ` Drew Adams
2018-10-10 16:08 ` Yuri Khan
2018-10-15 20:30 ` Juri Linkov
2018-10-10 3:58 ` Richard Stallman
2018-10-10 3:57 ` Richard Stallman
2018-10-10 14:41 ` Eli Zaretskii
2018-10-11 5:01 ` Richard Stallman
2018-10-06 15:40 ` eval-last-sexp / C-x C-e, and punctuation like `?’' [Was: Re: Change of Lisp syntax for "fancy" quotes in Emacs 27?)] Garreau, Alexandre
2018-10-16 12:48 ` Change of Lisp syntax for "fancy" quotes in Emacs 27? Garreau, Alexandre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83inba6i8b.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=acm@muc.de \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=npostavs@users.sourceforge.net \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.