From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Why "symbol's value" error about a list? Date: Tue, 6 Feb 2018 18:32:21 +1100 Message-ID: References: <83o9l6bhfs.fsf@gnu.org> <1fedc60d-35a7-4ff0-adbb-b6b8306d192f@default> <83wozu9f6r.fsf@gnu.org> <20180205203544.GA5310@ACM> <6608d822-4e12-4f17-8a67-4a0d72de538c@default> <83shae7o2u.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11415454e225fa0564862d46" X-Trace: blaine.gmane.org 1517902317 18849 195.159.176.226 (6 Feb 2018 07:31:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Feb 2018 07:31:57 +0000 (UTC) Cc: acm@muc.de, npostavs@users.sourceforge.net, rms@gnu.org, Drew Adams , Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 06 08:31:52 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eixio-0002hr-Gy for ged-emacs-devel@m.gmane.org; Tue, 06 Feb 2018 08:31:18 +0100 Original-Received: from localhost ([::1]:34808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eixkp-0000cs-Tc for ged-emacs-devel@m.gmane.org; Tue, 06 Feb 2018 02:33:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eixju-0008UQ-B4 for emacs-devel@gnu.org; Tue, 06 Feb 2018 02:32:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eixjs-0005HV-Ru for emacs-devel@gnu.org; Tue, 06 Feb 2018 02:32:26 -0500 Original-Received: from mail-ot0-x22b.google.com ([2607:f8b0:4003:c0f::22b]:43602) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eixjq-0005Fl-KD; Tue, 06 Feb 2018 02:32:22 -0500 Original-Received: by mail-ot0-x22b.google.com with SMTP id q12so849496otg.10; Mon, 05 Feb 2018 23:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uJESx7svYJKI1deB+nVRYBrA+PQoOUPlCV0BJtvsR+w=; b=t/Wot2kAgdQMGbmg4ySW9OZ7NM6hDLo0XBwNtr4+0aO+2rCS7EOiUMHE+XQak35MP7 1A1qcNWbvjf6v37cg7xrFk6CFga/UADUsNMK4ZL1uZT4FKiNC0Qxh5TRq57VLQ5R7Sno Y+jOOWtpeGVl5JYo9er73sbvXdwucq0iMyyemSJ8mmYD9Mc9bKYxvBcjkQTbWYHpJDVF jbkYAc+tQcTWjHlEs7zZTKnhrUwDAvU4A1iO+s1zV3R6cFjmedrivTuAZ//q22ucmr35 3iGfTSvrmQSZ2DJmvsxy8PaUiTUteuTYSfVxAlrNmxHwk3PUx2RH1MXv7kV7Qd+DLg3C zmUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uJESx7svYJKI1deB+nVRYBrA+PQoOUPlCV0BJtvsR+w=; b=RsK2LXoM317x5OItn8qKADXGLq3zS4dL5xyw15ISrxzvdGWXAsPBbG5ZTyWMS66i+O QmxabTFh4nEuPI8wC/uiJccUaNgKelvg639l4Y+88h7MytK9cdY+QVxjZlRxYVSzL+eI f9hL/B3CGCCOWA5WBFHXj/zZCzV78x/FM7cGEWbRYFjHY7tEsk3yyvGvOUQpIniPc695 zniB+XJUwXWTZHnA+XPTRhprEDWo0WbBqQlcxQonu+IEyEz/uKwTL99dmAmVNgshhP4F DTBGLeW/PP4MDnmpa6kUbTw6s6VKmZTJtXkauiv0ObA6AJve1Tcnud1nM08wsB/GEFE5 D35g== X-Gm-Message-State: APf1xPCygJZDBSuz6hnnzo5LsPcOkbclqXOU1hjfbk22uIIM5loezi9+ 1fsdNzuDI5XdSMy1VsU98nDBglbq51ms3c1m28TF+pMC X-Google-Smtp-Source: AH8x2253V3yVnK/3xudF5l0nM2Pi/CZ2hqRtAz2Zs5k4hLkFVC3LwP8/WqjoXZMQdFuqBXSD5UJ9l/u2M1IM774BumM= X-Received: by 10.157.52.186 with SMTP id g55mr979103otc.58.1517902341742; Mon, 05 Feb 2018 23:32:21 -0800 (PST) Original-Received: by 10.168.183.198 with HTTP; Mon, 5 Feb 2018 23:32:21 -0800 (PST) In-Reply-To: <83shae7o2u.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222570 Archived-At: --001a11415454e225fa0564862d46 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. 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. Tim On 6 February 2018 at 15:13, Eli Zaretskii wrote: > > Date: Mon, 5 Feb 2018 13:46:38 -0800 (PST) > > From: Drew Adams > > Cc: Eli Zaretskii , npostavs@users.sourceforge.net, > > emacs-devel@gnu.org > > > > > The error message given out is: > > > Symbol's value as variable is void: =E2=80=99bar > > > > 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" > > "=E2=80=99"). 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. > > > I suggested that the variable name be enclosed in `...'. That > > would make the original message clearer, I think: > > > > Symbol's value as variable is void: `=E2=80=99bar' > > That might make things even more confusing, because the text actually > displayed will be this: > > Symbol=E2=80=99s value as variable is void: =E2=80=98=E2=80=99bar=E2= =80=99 > > which loses all hints of what is being quoted here. > > > > This is a result of the change in `message', silently to convert ' to= a > > > curly quote, by default. Some of us were unhappy at this change and > > > protested against it. > > > > 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. > > That ship has sailed two Emacs releases ago. We are trying to fix the > fallout. > > And strange quotes is only one situation where confusingly similar > characters can be presented in error messages, making it hard for > users to spot the real problem. We are trying to find ways of making > such "typos" more evident in error messages. > > > The error is using a symbol as a variable, when it is not > > defined as a variable. Which is exactly what the original > > error message said. > > > > That's the LISP error. Is there a _user error_ here? > > Yes, it's the mistake of copying and pasting what was > > printed in *Messages*. > > > > That user mistake is excusable. And we would want to > > inform the user about it, if we can't prevent it. But > > changing Lisp read syntax to guess what might be the > > most helpful thing to tell a user here is NOT the solution. > > The issue is what _would_ be a helpful message in these cases. You > are just saying what should _not_ be done (repeatedly), but that > doesn't advance us towards the solution. > > > 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. > > --=20 regards, Tim -- Tim Cross --001a11415454e225fa0564862d46 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It seems there are two issues here - they are not complete= ly separate, but do seem to be distinct and probably need to be addressed i= n two steps.=C2=A0

If the statement=C2=A0

=
> Count me as one of those "some of us".=C2=A0= Echoing Lisp code
> should do just that - no fiddling to &quo= t;prettify" apostrophe to
> curly quote etc.
<= div>
is correct, then I would agree it was a bad design decis= ion. The *Messages* buffer should display lisp code exactly as it is read a= nd not try to 'prettify' it.=C2=A0=C2=A0

T= he second issue seems to be more about how to make the error message more i= nformative. 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.

=
Tim


On 6 February 2018 at 15:13, Eli Zaretskii <eliz@gnu.or= g> wrote:
> Date: Mon, 5= Feb 2018 13:46:38 -0800 (PST)
> From: Drew Adams <drew.ada= ms@oracle.com>
> Cc: Eli Zaretskii <eliz@gnu.org= >, npostavs@users.sour= ceforge.net,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0emacs-devel@gnu.org
>
> > The error message given out is:
> >=C2=A0 =C2=A0 =C2=A0Symbol's value as variable is void: =E2=80= =99bar
>
> That was the old, and legitimate, error message, yes.=C2=A0 It
> accurately describes what is really going on (as you describe
> well, below).
>
> Now the message is instead (invalid-read-syntax "strange quote&qu= ot;
> "=E2=80=99").=C2=A0 Is that better?

I think it's somewhat better, because it talks about "stran= ge quote",
which is a hint for the user about the actual problem.

> I suggested that the variable name be enclosed in `...'.=C2=A0 Tha= t
> would make the original message clearer, I think:
>
>=C2=A0 =C2=A0Symbol's value as variable is void: `=E2=80=99bar'=

That might make things even more confusing, because the text actuall= y
displayed will be this:

=C2=A0 =C2=A0 Symbol=E2=80=99s value as variable is void: =E2=80=98=E2=80= =99bar=E2=80=99

which loses all hints of what is being quoted here.

> > This is a result of the change in `message', silently to conv= ert ' to a
> > curly quote, by default.=C2=A0 Some of us were unhappy at this ch= ange and
> > protested against it.
>
> Count me as one of those "some of us".=C2=A0 Echoing Lisp co= de
> should do just that - no fiddling to "prettify" apostrophe t= o
> curly quote etc.

That ship has sailed two Emacs releases ago.=C2=A0 We are trying to = fix the
fallout.

And strange quotes is only one situation where confusingly similar
characters can be presented in error messages, making it hard for
users to spot the real problem.=C2=A0 We are trying to find ways of making<= br> such "typos" more evident in error messages.

> The error is using a symbol as a variable, when it is not
> defined as a variable.=C2=A0 Which is exactly what the original
> error message said.
>
> That's the LISP error.=C2=A0 Is there a _user error_ here?
> Yes, it's the mistake of copying and pasting what was
> printed in *Messages*.
>
> That user mistake is excusable.=C2=A0 And we would want to
> inform the user about it, if we can't prevent it.=C2=A0 But
> changing Lisp read syntax to guess what might be the
> most helpful thing to tell a user here is NOT the solution.

The issue is what _would_ be a helpful message in these cases.=C2=A0= You
are just saying what should _not_ be done (repeatedly), but that
doesn't advance us towards the solution.

> Should this Lisp syntax change be reverted?=C2=A0 That's the
> question being discussed here.

No, that's only part of the question.=C2=A0 The other, no less i= mportant
part is if we revert that change, how to make the confusing error
message less so and more helpful in understanding the user error.




--
regards,

Tim

--
T= im Cross

--001a11415454e225fa0564862d46--