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 06:13:13 +0200 Message-ID: <83shae7o2u.fsf@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> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1517890310 846 195.159.176.226 (6 Feb 2018 04:11:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Feb 2018 04:11:50 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org, rms@gnu.org, npostavs@users.sourceforge.net To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 06 05:11:46 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 1eiubV-0007fI-UL for ged-emacs-devel@m.gmane.org; Tue, 06 Feb 2018 05:11:34 +0100 Original-Received: from localhost ([::1]:49460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiudV-0007AB-AL for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2018 23:13:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiudN-00079e-Sm for emacs-devel@gnu.org; Mon, 05 Feb 2018 23:13:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiudK-0007B8-OG for emacs-devel@gnu.org; Mon, 05 Feb 2018 23:13:29 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiudK-0007B2-KG; Mon, 05 Feb 2018 23:13:26 -0500 Original-Received: from [176.228.60.248] (port=4824 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eiudD-0003xB-LM; Mon, 05 Feb 2018 23:13:20 -0500 In-reply-to: <6608d822-4e12-4f17-8a67-4a0d72de538c@default> (message from Drew Adams on Mon, 5 Feb 2018 13:46:38 -0800 (PST)) 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:222568 Archived-At: > 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: ’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. > 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: `’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. > > 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.