From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 9ce1d38: Use curved quotes in core elisp diagnostics Date: Wed, 19 Aug 2015 16:30:43 +0300 Message-ID: <55D48503.3020406@yandex.ru> References: <20150816160149.9416.80132@vcs.savannah.gnu.org> <55D1043C.3030909@yandex.ru> <55D15899.2070105@cs.ucla.edu> <55D1C9CE.2060407@yandex.ru> <55D20EDF.5070906@cs.ucla.edu> <55D223CA.4080109@yandex.ru> <55D22A1F.8040508@cs.ucla.edu> <55D22CF4.9030608@yandex.ru> <55D2747D.10809@cs.ucla.edu> <55D317A9.6000805@yandex.ru> <55D42210.9070703@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1439992126 5680 80.91.229.3 (19 Aug 2015 13:48:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Aug 2015 13:48:46 +0000 (UTC) To: Paul Eggert , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 19 15:48:41 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 1ZS3jM-0000G7-AN for ged-emacs-devel@m.gmane.org; Wed, 19 Aug 2015 15:48:40 +0200 Original-Received: from localhost ([::1]:34685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS3SV-00062v-AN for ged-emacs-devel@m.gmane.org; Wed, 19 Aug 2015 09:31:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS3S9-000606-S8 for emacs-devel@gnu.org; Wed, 19 Aug 2015 09:30:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZS3S4-0007hz-OF for emacs-devel@gnu.org; Wed, 19 Aug 2015 09:30:53 -0400 Original-Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:38046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS3S3-0007hK-V3 for emacs-devel@gnu.org; Wed, 19 Aug 2015 09:30:48 -0400 Original-Received: by wicja10 with SMTP id ja10so8502447wic.1 for ; Wed, 19 Aug 2015 06:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=i03b39lWXCSC/UCnAKNOWeGpYzPkpjiAgyQwhH8AmGA=; b=tokgde0hMP/vwXhQFzu1fN8UYwNcI0zHIhQtiNBrAnDEIJw5fnSwwkwPHjqmig0FUk lFm8wvb7fRF6vgtuYByAMGOrFyafRhr2UbK1cc4rZht1wgWrZ+4ZZ8xzUYopTMQGjySq nlxVSJrXV3Q0hv0zbK44DgjxbqXnPBgOpESRZYK6sxsktalu0naiZdySGLM2w+Kjnkks bP7gEuA0wtW1wqE3wo1NN8JDGtFgyZQgzrqB/T14AIb6hcdl+q7Adkjxq1HMrAqugMO/ HelSdG1M4Zu+C3csw4Qv9ghNz8Cvo3jsEh9owvSb5D1twKmw9TyZWKaU5cT8104ExWH5 F1Ug== X-Received: by 10.194.58.71 with SMTP id o7mr23914617wjq.82.1439991046879; Wed, 19 Aug 2015 06:30:46 -0700 (PDT) Original-Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id uo6sm1106906wjc.1.2015.08.19.06.30.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 06:30:45 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 In-Reply-To: <55D42210.9070703@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22c 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:188948 Archived-At: On 08/19/2015 09:28 AM, Paul Eggert wrote: > OK, thanks for reviewing; I installed the %q patch, and followed up with > simplifications that it allows at the C level, mostly by using %qs in > formats instead of uLSQM and uRSQM. This makes the C code easier to > read and so is a clear win. Doing something similar in Elisp code makes > the code harder to read, though, so I held off on that. Please don't take it as a review: I only verified that it corresponded to my proposal. But if you're not going to use the proposal as stated, and are still keeping curlies in Elisp source code, then, from where I'm standing, the new format sequence is not exactly justified. > we would have something like: > > (message "Press % or % for help, % to quit") That looks quite nice to me. > which is harder to read and is more error-prone. The %qs approach should be the least error-prone. > At the moment these situations are handled by ‘format’. Simply changing > the code to use ‘substitute-command-keys’ and ASCII characters would not > work in cases like the above, because (insert (substitute-command-keys > "')")) would insert an apostrophe regardless of user text-quoting > preference. Why? IIRC, when discussing a Lisp solution, you voted in favor of simple translation logic, one that didn't even check for pairings. substitute-command-keys could do the same. >> text -> (substitute-command-keys) -> text with "escaped" text prop >> -> (translate-quotes) -> text with non-escaped straight quotes >> replaces > > As mentioned above it's not obvious how to get that to work; even if we > did so it'd be more complicated and error-prone, and a bit slower. > Hardly seems worth it. As I've explained several times, we'll need this (or maybe some other, comparable) complexity to solve related issues.