From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#20385: [PROPOSED PATCH] Support quoting 'like this' in doc strings Date: Wed, 22 Apr 2015 07:52:56 -0700 (PDT) Message-ID: <6837d058-ba18-461b-8af6-2c4e6d767348@default> References: <1429555155-4695-1-git-send-email-eggert@cs.ucla.edu> <5535974D.9050207@cs.ucla.edu> <5535C7F3.7020107@cs.ucla.edu> <83618p5y9w.fsf@gnu.org> <83vbgp49ve.fsf@gnu.org> <83pp6x45x5.fsf@gnu.org> <5536ACB3.9040707@yandex.ru> <83lhhk4phe.fsf@gnu.org> <87a8y0jmba.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1429714476 5691 80.91.229.3 (22 Apr 2015 14:54:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Apr 2015 14:54:36 +0000 (UTC) Cc: eggert@cs.ucla.edu, 20385@debbugs.gnu.org, Dmitry Gutov To: Nicolas Petton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 22 16:54:23 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Ykw2Z-0005oX-EQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Apr 2015 16:54:15 +0200 Original-Received: from localhost ([::1]:35608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykw2Y-0004TP-Cg for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Apr 2015 10:54:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykw2Q-0004TD-3K for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 10:54:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykw2M-0004z6-T1 for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 10:54:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykw2M-0004yz-PU for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 10:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Ykw2M-0001lu-5C for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 10:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Apr 2015 14:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20385 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20385-submit@debbugs.gnu.org id=B20385.14297143956754 (code B ref 20385); Wed, 22 Apr 2015 14:54:02 +0000 Original-Received: (at 20385) by debbugs.gnu.org; 22 Apr 2015 14:53:15 +0000 Original-Received: from localhost ([127.0.0.1]:36645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ykw1a-0001kr-Un for submit@debbugs.gnu.org; Wed, 22 Apr 2015 10:53:15 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:49382) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ykw1Y-0001ke-OX for 20385@debbugs.gnu.org; Wed, 22 Apr 2015 10:53:13 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t3MEqwoP010058 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 Apr 2015 14:52:58 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t3MEqv3N017468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 22 Apr 2015 14:52:57 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t3MEqveQ014606; Wed, 22 Apr 2015 14:52:57 GMT In-Reply-To: <87a8y0jmba.fsf@petton.fr> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101872 Archived-At: > > I will add that one increasingly important use of `...' is that > > doc gets copied and pasted to other, non-Emacs environments. > > > > You might think that `...' is "ugly" (and that is the ONLY > > reason that's been given so far for changing it), but it has > > the distinct advantage that it is a unique way of quoting > > that separates itself from both strings ("...") and ordinary > > text quoting (curly quotes, double and single). > > > > If you post doc pieces into a context such as Stack Exchange, > > for example, you need only change the ' in `...' to `, to > > have that new context also, like Emacs, treat the quoted > > sexp specially - not a ordinary quoted text. That is, SE > > uses `...` instead of `...', but it does the same thing > > Emacs does, to make the result stand out as code and not as > > just any old quoted text. > > > > If you change `...' to ordinary curly quoting, you lose > > distinguishing what it quotes as code. > > > > Just one more consideration, another reason why the proposed > > change is a bad idea, IMHO. >=20 > I agree with you. >=20 > Maybe a compromise could be to add as an alternative syntax `...` > (just like SE or Markdown)? It would then fix the unbalanced quotes issue= . 1. `...` is not as simple to parse (e.g. using regexps) for Emacs highlighting etc. 2. But I also realize that I might not have been as clear in that post as I should have been. It's not only about the (increasing) need to be able to copy doc and paste it to other, non-Emacs environments. The more important point is that Emacs uses `...' as a different kind of quoting from ordinary text quoting. It is Emacs's way of quoting code that is inline (i.e., within ordinary text). In other doc systems one might use wrap such inline code with, say, and XML element: (forward-char 3). For technical doc related to programming, there is typically *some* way to set off inline code bits, to indicate that they are code, whether they are keywords or pieces of programs. Emacs's way has been `...'. And IMHO, it is a very good way. Very simple, and amenable to very simple regexp identification and thus highlighting & retrieval. If Emacs at some point decides to switch to another code-quoting mechanism, that's one thing. But what it definitely should NOT do, IMO, is to lose code quoting - lose talking about code from a meta level, and just quote code bits normally, so they become confused with ordinary text quoting. That was really the point I was trying to make in my last point. `...' is for code. Changing that to '...' loses the ability to distinguish code from anything else being quoted normally.