From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Why "symbol's value" error about a list? Date: Tue, 06 Feb 2018 09:40:16 +0200 Message-ID: <2001D107-BAEF-4F0F-97CF-3A77D0F41808@gnu.org> 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: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1517902788 28933 195.159.176.226 (6 Feb 2018 07:39:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Feb 2018 07:39:48 +0000 (UTC) User-Agent: K-9 Mail for Android Cc: acm@muc.de, Emacs developers , rms@gnu.org, Drew Adams , npostavs@users.sourceforge.net To: emacs-devel@gnu.org,Tim Cross Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 06 08:39:43 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 1eixqf-0006BK-HG for ged-emacs-devel@m.gmane.org; Tue, 06 Feb 2018 08:39:25 +0100 Original-Received: from localhost ([::1]:35537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eixsg-0005fI-Iu for ged-emacs-devel@m.gmane.org; Tue, 06 Feb 2018 02:41:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eixro-0005AD-0g for emacs-devel@gnu.org; Tue, 06 Feb 2018 02:40:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eixrk-0003xs-Ro for emacs-devel@gnu.org; Tue, 06 Feb 2018 02:40:36 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eixrk-0003xg-O7; Tue, 06 Feb 2018 02:40:32 -0500 Original-Received: from [176.13.21.248] (port=14016 helo=[10.132.96.190]) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1eixrd-0007kj-7R; Tue, 06 Feb 2018 02:40:25 -0500 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:222571 Archived-At: On February 6, 2018 9:32:21 AM GMT+02:00, Tim Cross wrote: > 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=2E >=20 > If the statement >=20 > > Count me as one of those "some of us"=2E Echoing Lisp code > > should do just that - no fiddling to "prettify" apostrophe to > > curly quote etc=2E >=20 > is correct, then I would agree it was a bad design decision=2E The > *Messages* > buffer should display lisp code exactly as it is read and not try to > 'prettify' it=2E >=20 > The second issue seems to be more about how to make the error message > more > informative=2E I suspect this is a much harder problem to resolve=2E 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=2E >=20 > Tim >=20 >=20 > On 6 February 2018 at 15:13, Eli Zaretskii wrote: >=20 > > > Date: Mon, 5 Feb 2018 13:46:38 -0800 (PST) > > > From: Drew Adams > > > Cc: Eli Zaretskii , npostavs@users=2Esourceforge=2En= et, > > > emacs-devel@gnu=2Eorg > > > > > > > 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=2E It > > > accurately describes what is really going on (as you describe > > > well, below)=2E > > > > > > Now the message is instead (invalid-read-syntax "strange quote" > > > "=E2=80=99")=2E 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=2E > > > > > I suggested that the variable name be enclosed in `=2E=2E=2E'=2E Th= at > > > 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=2E > > > > > > This is a result of the change in `message', silently to convert > ' to a > > > > curly quote, by default=2E Some of us were unhappy at this change > and > > > > protested against it=2E > > > > > > Count me as one of those "some of us"=2E Echoing Lisp code > > > should do just that - no fiddling to "prettify" apostrophe to > > > curly quote etc=2E > > > > That ship has sailed two Emacs releases ago=2E We are trying to fix > the > > fallout=2E > > > > 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=2E We are trying to find ways of > making > > such "typos" more evident in error messages=2E > > > > > The error is using a symbol as a variable, when it is not > > > defined as a variable=2E Which is exactly what the original > > > error message said=2E > > > > > > That's the LISP error=2E Is there a _user error_ here? > > > Yes, it's the mistake of copying and pasting what was > > > printed in *Messages*=2E > > > > > > That user mistake is excusable=2E And we would want to > > > inform the user about it, if we can't prevent it=2E But > > > changing Lisp read syntax to guess what might be the > > > most helpful thing to tell a user here is NOT the solution=2E > > > > The issue is what _would_ be a helpful message in these cases=2E You > > are just saying what should _not_ be done (repeatedly), but that > > doesn't advance us towards the solution=2E > > > > > Should this Lisp syntax change be reverted? That's the > > > question being discussed here=2E > > > > No, that's only part of the question=2E 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=2E > > > > Lisp code is not changed in messages; only quoted plain text is=2E