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: Change of Lisp syntax for "fancy" quotes in Emacs 27? Date: Fri, 05 Oct 2018 11:43:55 +0300 Message-ID: <83y3bc2378.fsf@gnu.org> References: 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 1538729296 2483 195.159.176.226 (5 Oct 2018 08:48:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2018 08:48:16 +0000 (UTC) Cc: emacs-devel@gnu.org, drew.adams@oracle.com, npostavs@users.sourceforge.net To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 05 10:48:12 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 1g8LmO-0000WH-C9 for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2018 10:48:12 +0200 Original-Received: from localhost ([::1]:33866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8LoU-0001KW-OL for ged-emacs-devel@m.gmane.org; Fri, 05 Oct 2018 04:50:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8Lnk-0000G2-5X for emacs-devel@gnu.org; Fri, 05 Oct 2018 04:49:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8Lic-00037D-BX for emacs-devel@gnu.org; Fri, 05 Oct 2018 04:44:19 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8LiV-00031W-60; Fri, 05 Oct 2018 04:44:11 -0400 Original-Received: from [176.228.60.248] (port=2654 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g8LiU-0001Ex-K7; Fri, 05 Oct 2018 04:44:11 -0400 In-reply-to: (message from Paul Eggert on Thu, 4 Oct 2018 18:01:26 -0700) 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:230230 Archived-At: > From: Paul Eggert > Date: Thu, 4 Oct 2018 18:01:26 -0700 > Cc: Drew Adams > > I'm afraid this patch is heading in the wrong direction, as we should be > more vigilant about confusables, not less. > > Consider this example, abstracted from the auth-source-secrets-create > source code: > >     (if (eq r 'secret) >         (let ((data data)) >           (lambda () data)) >       data) Is this example relevant to the proposed changes? The latter only change what we do for quote-like symbols that are not interpreted as quotes by the Lisp reader. You, OTOH, are raising a different problem, one for which AFAIK we currently have no solution. The general issue of "confusable" characters, both in Lisp code and in user interaction, is an issue that still awaits a proper solution in Emacs. (Many moons ago, I was seduced to write a couple of primitives to allow detection of confusable text that played tricks with bidi reordering, but AFAICT those primitives are still not used, which is a pity, IMO.) I'd encourage people to work on this. However, the much more narrow issue brought up by this bug report is specifically about quote characters. It is related to changes in our messages, which now by default produce non-ASCII quotes, something that made this particular problem more probable than it was before. I think as long as we don't disallow such characters in Lisp symbols, the proposed treatment, via evaluation-time warning, is a reasonable solution, slightly better than the somewhat confusing error message we present now. We could also augment that by displaying the confusable characters in a distinct face, something we already do for some of them. IOW, I disagree with "discourage" part of your opinion: there's nothing wrong with using such characters as long as we don't formally cease to support them. And the commonly accepted mechanism of pointing out potentially wrong constructs is by visual cues and warning messages, not by erroring out. Compare how we treat something like this in C programs: if (a = b) { do something; }