From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors Date: Thu, 11 Jun 2015 19:06:40 +0000 Message-ID: <20150611190640.GA2752@acm.fritz.box> References: <20150608171804.GA3184@acm.fritz.box> <55768D82.3040509@cs.ucla.edu> <20150609133423.GA3735@acm.fritz.box> <5577516B.9020709@cs.ucla.edu> <20150609224616.GC3735@acm.fritz.box> <557779E9.3050409@cs.ucla.edu> <20150610133931.GA3632@acm.fritz.box> <557863CA.8060609@cs.ucla.edu> <20150610191730.GB3632@acm.fritz.box> <557893B3.7090402@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1434049645 12808 80.91.229.3 (11 Jun 2015 19:07:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Jun 2015 19:07:25 +0000 (UTC) Cc: 20707@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 11 21:07:14 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 1Z37on-00028d-Fu for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jun 2015 21:07:13 +0200 Original-Received: from localhost ([::1]:48123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z37om-000752-Ax for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jun 2015 15:07:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z37oi-00074r-29 for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 15:07:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z37oc-00087o-Vz for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 15:07:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z37oc-000875-Rx for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 15:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z37oc-0003Nl-HY for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 15:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jun 2015 19:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20707 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20707-submit@debbugs.gnu.org id=B20707.143404957412941 (code B ref 20707); Thu, 11 Jun 2015 19:07:02 +0000 Original-Received: (at 20707) by debbugs.gnu.org; 11 Jun 2015 19:06:14 +0000 Original-Received: from localhost ([127.0.0.1]:51011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z37np-0003Me-1q for submit@debbugs.gnu.org; Thu, 11 Jun 2015 15:06:14 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:53468) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z37nm-0003MU-PE for 20707@debbugs.gnu.org; Thu, 11 Jun 2015 15:06:11 -0400 Original-Received: (qmail 29682 invoked by uid 3782); 11 Jun 2015 19:06:09 -0000 Original-Received: from acm.muc.de (p579E8973.dip0.t-ipconnect.de [87.158.137.115]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 11 Jun 2015 21:06:08 +0200 Original-Received: (qmail 3574 invoked by uid 1000); 11 Jun 2015 19:06:40 -0000 Content-Disposition: inline In-Reply-To: <557893B3.7090402@cs.ucla.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:103834 Archived-At: Hello, Paul. On Wed, Jun 10, 2015 at 12:44:51PM -0700, Paul Eggert wrote: > On 06/10/2015 12:17 PM, Alan Mackenzie wrote: > > It seems to me, judging by the number of questions relating to Emacs on > > the Linux console I've answered over the years, the number of users is > > not small. > I'm afraid there was a miscommunication there. My message was not about > people who use the Linux console, a small but hardy band of hackers. Phew! I'm glad to hear that! > It was about people who use the Linux console in an awful mode that > can't display curved single quotes. That's not you, and it's not me > (and I do use Emacs on the Linux console and I haven't configured it > specially), and I doubt whether it's RMS either. My setup couldn't display curly single quotes (I've now created a font based on lat1-16.psfu where I substitued the French glyphs "oe" and "OE" with the single curly quotes) - instead it lied to me and displayed the glyphs for 0x60 and 0x27 when there were curly quotes. This hard linking of curly and ASCII quotes contravenes the WYSIWYG principle. I presume this lack of distinct glyphs will be quite common. > Perhaps some people use Emacs that way occasionally, but I'm skeptical > that this is a significant problem. We simply don't know, one way or the other. > If it is, we can easily solve it by automatically doing in Emacs the > equivalent of the font substitution I gave the shell script for in a > recent message. So this issue is not a fundamental obstacle to the > change. Hmm. Not sure about "easily". On a Linux console being used for editing files.el, we can probably safely assume that all ASCII characters are available. More than that, not much. In fact, I've tried out quite a few different fonts in /usr/share/consolefonts. All of them have ASCII, most, but not all, alias the single curly quotes with 0x27, 0x60, none of them that I've seen so far have distinct glyphs for the curly quotes. > > My proposition is that string literals remain constants > > just as they are now. The decision would be made at configuration time, > > and a trivial #ifdef in the reader would decide at build time how to > > expand the escaped quotes. > Making them constants removes the most serious objection I had to the > idea. I wouldn't favor writing documentation that way, as it's ugly to > quote \`like this\' when it can easily be quoted ‘like this’. That easiness remains controversial. Typing \ then ` is going to be in people's muscle memory, whereas something like -` less so. In fact, I'd bet a fair amount that people will carry on writing `...', just as they've done for decades, and there will be regular "raids" from the wonderful people here who do finnicky thankless corrections. > But it could be useful for people who prefer its minor ugliness to > having to learn how to type curved quotes, so I suppose we can add it. To be useful, it would have to become the standard way of quoting symbols. > However, the configuration-time switch sounds like a non-starter, as it > would be one more source of portability hassles and it shouldn't be > needed if we get the display problems fixed, ... Where do you see any portability hassles? If built --without-curly-quotes, Emacs would run under any system handling ASCII, as at present. If built --with-curly-quotes, it will be less portable, as we've discussed at length, but will be no less portable than the non-optional curly quote system you're proposing. What exactly do you mean by "display problems fixed"? Either a font has curly quotes (I haven't found one, other than my own, which has), aliases them with other characters, or doesn't have them. In the first case there's nothing to fix, while the other two cases can't really be fixed at all - there are merely workarounds. > ... which we need to fix anyway. That is, the escapes should simply > generate curved single quotes on all platforms. ... which removes half the point in having the \` \' constructs in the first place. (The other half is in it being easier to type \` and /' than ? and ?.) Incidentally, I've just tried electric-quote-mode in master. It seems more like a proof of concept than a finished feature. In particular, I don't think it's TRT simply to curlify any quote typed within a string - some strings mean quite definitely 0x27 and 0x60. And to be 100% sure we're within a string is difficult. How about only curlifying when there's a matched pair of quotes containing exactly a symbol, and uncurlifying when that ceases to be the case? -- Alan Mackenzie (Nuremberg, Germany).