From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Change of Lisp syntax for "fancy" quotes in Emacs 27? Date: Sun, 4 Feb 2018 11:15:50 +0000 Message-ID: <20180204111550.GA4919@ACM> References: <83o9l6bhfs.fsf@gnu.org> <1fedc60d-35a7-4ff0-adbb-b6b8306d192f@default> <83wozu9f6r.fsf@gnu.org> <87r2q1r1tn.fsf@web.de> 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 1517743432 16234 195.159.176.226 (4 Feb 2018 11:23:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Feb 2018 11:23:52 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: Eli Zaretskii , emacs-devel@gnu.org, Drew Adams , npostavs@users.sourceforge.net To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 04 12:23:48 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 1eiIOX-0003HZ-BN for ged-emacs-devel@m.gmane.org; Sun, 04 Feb 2018 12:23:37 +0100 Original-Received: from localhost ([::1]:37131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiIQY-0003ZZ-IS for ged-emacs-devel@m.gmane.org; Sun, 04 Feb 2018 06:25:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiIQQ-0003Yy-Kz for emacs-devel@gnu.org; Sun, 04 Feb 2018 06:25:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiIQM-00074H-Ml for emacs-devel@gnu.org; Sun, 04 Feb 2018 06:25:34 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:19428 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1eiIQM-000715-FC for emacs-devel@gnu.org; Sun, 04 Feb 2018 06:25:30 -0500 Original-Received: (qmail 50200 invoked by uid 3782); 4 Feb 2018 11:25:28 -0000 Original-Received: from acm.muc.de (p548C6A24.dip0.t-ipconnect.de [84.140.106.36]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 04 Feb 2018 12:25:27 +0100 Original-Received: (qmail 5083 invoked by uid 1000); 4 Feb 2018 11:15:50 -0000 Content-Disposition: inline In-Reply-To: <87r2q1r1tn.fsf@web.de> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:222499 Archived-At: Hello, Michael. On Sun, Feb 04, 2018 at 02:16:52 +0100, Michael Heerdegen wrote: > Hello, > Helpfulness of error messages surely depends on the beholder, and on > expectations. In my eyes, > > Symbol's value as variable is void: 'аbbrevs-changed > is quite clear: you think this ^^^^^^^^^^^^^^^^ is a quoted > thing, but the error message calls it a symbol. So there must be a > problem with that quote, it has obviously gotten read as part of the > symbol. Sure, you have still to find out why. OTOH This has actually happened to me. In the error message, I didn't see the quote as part of the symbol, I subconsciously dismissed it as a quoting convention in the error message. So what my brain saw was Symbol's value as variable is void: abbrevs-changed . This puzzled me a long time. > > > (invalid-read-syntax "strange quote" "’") > also doesn't say what's wrong with that quote. It even calls something > a quote where there is none. Perhaps "strange quasi quote" would be more emphatic and clearer. > The error message is confusing. Repeating the pseudo quote character > in the error message doesn't make it look less like a quote. Agreed, on both points. > > I think you are so eager to make your point that you are willing to > > claim that black is white and vice versa. Any objective person would > > agree that the new error message is more directly pointing to the root > > cause > Are you really sure that every Emacs user would expect that we modify > the Lisp reader to catch typos? We're not talking about typos here. The curly quotes aren't present on typical keyboard layouts (though I'm informed they are present on Finnish keyboards), so nobody who isn't Finnish will type one of these characters by accident. We're talking about Emacs itself corrupting ASCII quotes into curly quotes in a `message' call because of the default setting of `text-quoting-style', and so on. Because of this, the error message should concentrate on that quote, not the strange symbol, which Emacs itself created. [ .... ] > > Symbol's value as variable is void: 'аbbrevs-changed. > Misusing something fundamental as the Lisp reader to catch such stuff > should be the very last resort. The result can get much more confusing > in situations we now don't think about. Maybe we're already at the last resort for this problem. Or maybe not. Maybe an error message for unknown symbols should check for them beginning with a curly quote. > > > Lisp doesn't have a bug here. > > That's a strawman, and you know it. We are talking about diagnostics > > for bugs in Lisp programs. > I think it's a eligible argument. Drew just thinks it's the wrong fix. > He may also think that no fix would maybe suffice. That's ok, and I > think he made some good points. > We should discuss about alternative approaches to move forward. People > often paste stuff into scratch or the M-: prompt that they copied from > elsewhere. Maybe we could make M-: and C-x C-e check for this problem. > These could also check for other, similar frequent problems. Any better > suggestions? I think that's a good suggestion. > Michael. -- Alan Mackenzie (Nuremberg, Germany).