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: Fri, 12 Jun 2015 11:25:39 +0000 Message-ID: <20150612112539.GA3220@acm.fritz.box> References: <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> <20150611190640.GA2752@acm.fritz.box> <557A46F2.50201@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 1434108402 17633 80.91.229.3 (12 Jun 2015 11:26:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jun 2015 11:26:42 +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 Fri Jun 12 13:26:27 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 1Z3N6E-0000sY-HH for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jun 2015 13:26:14 +0200 Original-Received: from localhost ([::1]:50623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3N6D-0005G1-J4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jun 2015 07:26:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3N69-0005Fs-SG for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2015 07:26:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3N64-0006Bj-RU for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2015 07:26:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3N64-00068N-3c for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2015 07:26:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z3N63-0004sn-Kv for bug-gnu-emacs@gnu.org; Fri, 12 Jun 2015 07:26:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jun 2015 11:26:03 +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.143410831418696 (code B ref 20707); Fri, 12 Jun 2015 11:26:03 +0000 Original-Received: (at 20707) by debbugs.gnu.org; 12 Jun 2015 11:25:14 +0000 Original-Received: from localhost ([127.0.0.1]:51294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z3N5E-0004rT-T6 for submit@debbugs.gnu.org; Fri, 12 Jun 2015 07:25:13 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:51679) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z3N5B-0004rE-9f for 20707@debbugs.gnu.org; Fri, 12 Jun 2015 07:25:10 -0400 Original-Received: (qmail 5794 invoked by uid 3782); 12 Jun 2015 11:25:07 -0000 Original-Received: from acm.muc.de (p5B1462B9.dip0.t-ipconnect.de [91.20.98.185]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 12 Jun 2015 13:25:06 +0200 Original-Received: (qmail 3840 invoked by uid 1000); 12 Jun 2015 11:25:39 -0000 Content-Disposition: inline In-Reply-To: <557A46F2.50201@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:103857 Archived-At: Hello, Paul. On Thu, Jun 11, 2015 at 07:41:54PM -0700, Paul Eggert wrote: > Alan Mackenzie wrote: > > My setup couldn't display curly single quotes > Sure it could. It displayed curved single quotes as curved single quotes. Your > objection was that your setup also displayed grave accent and apostrophe as > curved single quotes (a style you happen to prefer), .... No. The curly quotes had hijacked the glyphs for 0x27 and 0x60. I think it likely that these glyphs originated as those for 0x27 and 0x60, and were so before Unicode even existed. > ... and you wanted your setup to display *different-shaped curves* for > curved single quotes. This will not be not a problem to the few > ordinary Emacs users who happen to use a similar obsolescent > environment; they'll merely see nicely curved single quotes and move > on. That's pure speculation. So far, we've got one data point, me, and I was not at all happy about this aliasing when I discovered it. Nobody has yet chimed in and said they'd be happy about it on their own system. > > none of them that I've seen so far have distinct glyphs for the curly > > quotes. > Again, distinct glyphs are not a requirement for ordinary Emacs users. Again, we just don't know this one way or the other. Anyway I thought we'd agreed on the WYSIWYG principle. With this aliasing, WYS is ambiguous, WYG is not. > That being said, for Emacs developers such as yourself, the > Lat15-Terminus16 font I mentioned earlier has distinct glyphs for > curved quotes, as does Lat15-TerminusBold16. You can find them > archived at . There are many other choices > in this area. Yes, but of the standard fonts (i.e., those distributed in the kbd GNU/Linux package) I'm not sure there're any with distinct glyphs for curly quotes. I think whatever happens, messing around with fonts would be needed for lots of console users. > > That easiness remains controversial. > It's certainly easier to read text quoted ‘like this’ than to read text quoted > \`like this\'. Yes, but marginally so. It's not easier to type it, electric-quote-mode notwithstanding. Nobody's ever complained about \"like this\" in a string. We all cope with far worse in complicated regular expressions. > > To be useful, it would have to become the standard way of quoting > > symbols. > I doubt whether it'll be the standard. It's uglier and more complicated than > the alternative. Its main advantage is that it's easier to type for users who > want to type only ASCII. The main advantage is that it would allow users to chose whether they want curly quotes routinely in their doc strings. How about another approach - leave the doc strings as they are, and translate `foo-bar' to ?foo-bar? when doing C-h f/v, and so on? `..' is used in doc strings mainly for quoting _symbols_, and it may well be that that's the only use of this quoting style. Making this enhancement would certainly be less work than changing several tens of thousands of `foo-bar's in the source code. > > Where do you see any portability hassles? > Code might work when running on a typical Emacs system, but might fail on an > Emacs system configured --without-curved-quotes, because Emacs will generate > different strings that will be treated differently. I can't see that. There'd just be displayable characters in the two versions - why would it matter that they were different? Maybe if the string were being passed to `read', there could be a difference, but in that case it's the curly-quote version which is more likely to be erroneous. > > What exactly do you mean by "display problems fixed"? > On the rare systems that don't display curved quotes as quotes, Emacs should > display straight quotes as substitutes. That's good enough for these rare and > obsolescent systems. OK. I don't agree with this approach, of course. > > I don't think it's TRT simply to curlify any quote typed within a string > Electric Quote mode doesn't do that. If you type an apostrophe, it normally > leaves the apostrophe alone. And in the rare cases where one really wants a > grave accent and not a left single quote, it's easy enough to type C-q `. OK. I hadn't tried typing just apostrophes. Sorry. [ .... ] -- Alan Mackenzie (Nuremberg, Germany).