From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim Date: Thu, 03 Sep 2015 10:34:25 -0400 Message-ID: References: <20150831061236.27796.57762@vcs.savannah.gnu.org> <55E3F434.2060507@yandex.ru> <55E496DC.1030608@cs.ucla.edu> <877foas9jh.fsf@gmail.com> <55E5FD79.3060309@yandex.ru> <55E6DA8C.1030403@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441291767 1174 80.91.229.3 (3 Sep 2015 14:49:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Sep 2015 14:49:27 +0000 (UTC) Cc: Paul Eggert , Oleh Krehel , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 03 16:49:19 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZXVpF-0004BL-4U for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 16:49:17 +0200 Original-Received: from localhost ([::1]:48689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXVpE-0000hg-Er for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 10:49:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXVb8-000390-A6 for emacs-devel@gnu.org; Thu, 03 Sep 2015 10:34:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXVb4-0007U3-74 for emacs-devel@gnu.org; Thu, 03 Sep 2015 10:34:42 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:60918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXVb4-0007Td-1Y for emacs-devel@gnu.org; Thu, 03 Sep 2015 10:34:38 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t83EYP4l012211; Thu, 3 Sep 2015 10:34:26 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id CA4CF66110; Thu, 3 Sep 2015 10:34:25 -0400 (EDT) In-Reply-To: <55E6DA8C.1030403@yandex.ru> (Dmitry Gutov's message of "Wed, 2 Sep 2015 14:16:28 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5418=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5418> : inlines <3749> : streams <1499194> : uri <2031662> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189502 Archived-At: >> W.r.t ambiguity, the main problem I see is that we currently can never >> be sure that when we see a ` followed by a ' the two actually form a pair. >> A human usually can tell, but a program can't get it right 100% of the time. > Okay. But then, there's no problem in using the same quoting for key > sequences, aside from the quote-matching algorithm. I'm not fundamentally opposed to it, but I'd like the rule to be *simple*. If we try and accommodate key sequences, I'm afraid the rule will become too complex, and we'll bump into corner cases like how to quote key sequences like C-x ' or M-`. In most cases, there shouldn't be key sequences in docstrings anyway since we should use \\[...] instead, so there's no strong need to accommodate quoting of key sequences. >> Not sure I want to go down that road. What about `(foo 'a 'b)' ? > That, too. At least if this quote-matching logic is implemented in Elisp, > forward-sexp can take care of skipping the spaces. Yes, again it can be made to work. But what it boils down to is this: - `...' can't handle all cases without breaking existing uses, so we'll need another quoting mechanism anyway. - in most cases, I don't see a strong need to quote code like (foo a b). Maybe at some point we'll start doing things like "prettifying" the code in docstrings, at which point we'll need it to be quoted, but until that happens, the cost/benefit tradeoff is in favor of keeping the code unquoted. - so I don't see a strong need to accommodate quoting like `(foo a b)'. If the simple rule we devise happens to allow it, that's fine, of course. Stefan