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: Escaping quotes in docstrings, Was: A simple solution to "Upcoming loss of usability ..." Date: Sun, 2 Aug 2015 15:51:33 +0300 Message-ID: <55BE1255.3040401@yandex.ru> References: <87egkzg7gb.fsf@gmail.com> <558C2E25.10303@cs.ucla.edu> <558C492E.9000705@yandex.ru> <558C7DE1.4060507@cs.ucla.edu> <558C82D2.1070408@yandex.ru> <558CBA7E.7060900@cs.ucla.edu> <558D403D.303@yandex.ru> <558EDD4C.4040002@cs.ucla.edu> <558EE315.3080107@yandex.ru> <558F10FA.409@cs.ucla.edu> <558F4804.1020406@yandex.ru> <559010D6.5090905@cs.ucla.edu> <559058AD.5060504@yandex.ru> <55908355.3080407@yandex.ru> <559356D2.4000103@cs.ucla.edu> <5594813A.3000705@yandex.ru> <5594E0DB.1080702@cs.ucla.edu> <559A1C54.5030405@cs.ucla.edu> <559A6F86.2080809@yandex.ru> <559AAD27.3000403@cs.ucla.edu> <559AFCC3.3070409@yandex.ru> <559B85BE.4070303@cs.ucla.edu> <559B902D.4000906@yandex.ru> <55BC22BB.4020002@cs.ucla.edu> <55BD34B2.5060001@yandex.ru> <55BDBF2C.10000@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 1438519922 20119 80.91.229.3 (2 Aug 2015 12:52:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Aug 2015 12:52:02 +0000 (UTC) To: Paul Eggert , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 02 14:52:02 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 1ZLskD-0005ix-KZ for ged-emacs-devel@m.gmane.org; Sun, 02 Aug 2015 14:52:01 +0200 Original-Received: from localhost ([::1]:55949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLskC-0007zg-Nh for ged-emacs-devel@m.gmane.org; Sun, 02 Aug 2015 08:52:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLsjz-0007zS-O0 for emacs-devel@gnu.org; Sun, 02 Aug 2015 08:51:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLsjs-00045O-JD for emacs-devel@gnu.org; Sun, 02 Aug 2015 08:51:47 -0400 Original-Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:33279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLsjs-00044m-DN for emacs-devel@gnu.org; Sun, 02 Aug 2015 08:51:40 -0400 Original-Received: by wicmv11 with SMTP id mv11so105409819wic.0 for ; Sun, 02 Aug 2015 05:51:38 -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=a23XeIY1wyt1+Y2iUNGpu42xu4/rz3jVsexfRXnsJRg=; b=B81dIS9+S6+stH1ogJLHY8B91RvOLpxpKzyzCJgkw4z0oC2/3kE9O0Fc8XNK9loHkR 0deyhjeLXoI4araIqJ9p80C41CLpJlzb5vj6OQdNo33aJOyxxbb9TM3Dfdwluwo3nJuG tDKXrTo6ErKH8pApgbroWDP3Ke7Z3HZxiPXtcnBRzPJZbCwfUF5HpVa7GmPHgt2ld6qv Rx3eyzlCEzvPSSL3I7VNoiwViuCuphEUeLPbmJ7mWBbsiKhKVAYWbzmOcKSBQ99oe9l6 9/Ry9pwwDkqQDMn/b2jRS3Dt8Q4uyiGT1xU9AuFWp2j3LiRRerbDa1x1vVPCNtSd3fjJ HIOg== X-Received: by 10.194.77.70 with SMTP id q6mr24489171wjw.70.1438519898757; Sun, 02 Aug 2015 05:51:38 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id df1sm8073655wib.12.2015.08.02.05.51.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Aug 2015 05:51:37 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 In-Reply-To: <55BDBF2C.10000@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::22b 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:188291 Archived-At: On 08/02/2015 09:56 AM, Paul Eggert wrote: > Yes, and one can come up with other contrived examples that fail even > without putting curved quotes into the name. Elisp function names can > contain any character: apostrophe, grave accent, newline, parenthesis, > space, etc., and I'm sure many of these other special characters also > cause problems in help buffers. But we have an escaping syntax! Yet, Elisp doesn't know what's escaped and what isn't, so even this won't help: (defun ’‘ (a b c) "It's called `\\=’\\=‘'." (+ 1 2 3)) > While it might be worthwhile to fix this, it's an independent issue. If > it is fixed, I expect you're right that substitute-command-keys will > need to be teased apart; It's also a matter of readability. Take the latest related commit that you pushed. Sometime later, someone will come along and wonder: why do we need to substitute command keys in widget options? Who would put keys in there? > this is not just because of curved quotes, but > also because its other substitutions can generate characters that also > need special treatment. You might want to give an example. But in general, those characters also could have `escaped' put on them. Or `substituted', for instance. > If someone wants to take on that task, that's > great, so long as it doesn't get in the way of ordinary use of *Help* > buffers. As long as that task involves rearranging C code, you're excluding a significant portion of Emacs developers from contributing, myself included. > In particular, users should be able to type ‘C-h f length > RET’, see this in a *Help* buffer: > > To get the number of bytes, use ‘string-bytes’. > > and if they save and later yank this text into a source-code buffer they > should get what they see, not a bowdlerized version with ASCII > approximations. First, it's an arbitrary condition that you've set yourself, and we've discussed it already. If you asked all Emacs users, I suspect the majority won't care, and the rest won't reach a unanimous decision. Personally, I'd prefer that ‘string-bytes’, after copying and pasting to a "normal" buffer, turned into the original markup, which, in this case, is `string-bytes'. But that seems non-trivial to implement. Second, as long as font-lock isn't used for translation (and we've pretty much agreed that it won't), why wouldn't a Lisp solution work like you describe?