From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#20707: Use curved quoting in C-generated errors Date: Thu, 11 Jun 2015 14:06:50 +0100 Message-ID: References: <20150606155445.GE3418@acm.fritz.box> <557337CD.60706@cs.ucla.edu> <20150606205023.GA3862@acm.fritz.box> <55738BA9.7050104@cs.ucla.edu> <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> 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 1434028120 11257 80.91.229.3 (11 Jun 2015 13:08:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Jun 2015 13:08:40 +0000 (UTC) To: 20707@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 11 15:08:28 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 1Z32Db-0002L5-FS for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jun 2015 15:08:27 +0200 Original-Received: from localhost ([::1]:46643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z32Da-0003FM-My for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jun 2015 09:08:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z32DR-0003Ea-Bf for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 09:08:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z32DC-0008G9-De for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 09:08:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z32DC-0008G1-9x for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 09:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z32DB-0003X0-TQ for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 09:08:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <1433144361-9424-1-git-send-email-eggert@cs.ucla.edu> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jun 2015 13:08:01 +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 X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143402804113521 (code B ref -1); Thu, 11 Jun 2015 13:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jun 2015 13:07:21 +0000 Original-Received: from localhost ([127.0.0.1]:50448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z32CW-0003Vz-IO for submit@debbugs.gnu.org; Thu, 11 Jun 2015 09:07:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38215) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z32CU-0003Vm-4B for submit@debbugs.gnu.org; Thu, 11 Jun 2015 09:07:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z32CN-0007fC-FB for submit@debbugs.gnu.org; Thu, 11 Jun 2015 09:07:12 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z32CN-0007ex-C3 for submit@debbugs.gnu.org; Thu, 11 Jun 2015 09:07:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z32CM-0002aQ-7m for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 09:07:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z32CH-0007Yz-45 for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 09:07:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:45298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z32CG-0007Xd-QR for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 09:07:05 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z32CD-0001do-PZ for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2015 15:07:02 +0200 Original-Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jun 2015 15:07:01 +0200 Original-Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jun 2015 15:07:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 99 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uk.solarflare.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:wEQ6xAVYwxAhFNZ1/RH8Av3UeeQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:103820 Archived-At: On Wed 10 Jun 2015, Paul Eggert wrote: > Alan Mackenzie wrote: > >> You want to >> promote difficult-to-type and problematic-to-display characters to the >> status of standard "working characters". > > The problems aren't that serious. Display problems are limited to obsolete > environments that hardly anybody uses because they're so awful, and even there > we have workarounds. Please don't project your own experience onto the wider emacs community. Their usage patterns and experience are almost certainly different to yours. > And typing problems aren't a big deal in my Emacs > environment: for left and right single quotes I normally type a single > keystroke, without any control or shift or meta keys. (This is because I use > Electric Quote mode.) Other typing environments are also available that work > nearly as well (using Alt-[ and Alt-] for the two characters, if your Alt key > works). Again, you underestimate the difficulty of typing these characters in other environments. C-x 8 RET LEFT DOUBLE QUOTATION MARK is a pig to type compared to having a single keystroke for a character printed on a keycap. Having tried Electric Quote mode briefly: a) `electric-quote-local-mode' should be named `electric-quote-mode' b) `electric-quote-mode' should be named `global-electric-quote-mode' and possibly be implemented with `define-globalized-minor-mode' c) The mode seems to convert ` to a curly quote regardless of context, but it would make more sense if it only converted matched pairs of `' style quotation. > I'm not expecting everyone to use these keyboard methods right away. There > will be a transition period, and perhaps other, better methods of dealing this > will emerge. However, there should be no obstacle to people who do want to > use those methods. I have no objection to providing optional ways to use curved quotes according to local tastes. however you are foisting this on the entire emacs community as a default setting without having done enough work on the compatibility issues. >> I have a feeling you're intending to argue for making the use of curly >> quotes in our Lisp files standard. > > Yes, of course. It should be normal to type quotes as themselves in doc > strings. It's basic WYSIWYG. You seem to have confused representation and presentation. It is reasonable to allow presentation to use curved quote characters, even if the underlying representation is still using `' style quoting. Changing the representation seems to bring only problems with backward compatibility. >> Anyway, here's another idea for making curly quotes in lisp code >> optional: an escaped 0x27 or 0x60 in a string should be translated by the >> reader to the appropriate ASCII or curly quote, depending on the user's >> configuration. So a doc string might contain this: >> >> \`foo-bar\' > > I considered doing that, but there were problems. First, it would make doc > strings harder to read. For example, this: > > "Setting this attribute will also set the \`:family\', > \`:foundry\', \`:width\', \`:height\', \`:weight\', and > \`:slant\' attributes." > > is harder to read than this: > > "Setting this attribute will also set the ‘:family’, ‘:foundry’, > ‘:width’, ‘:height’, ‘:weight’, and ‘:slant’ attributes." > > Second, the new escapes would cause mental overload with similar > already-existing uses (e.g., ?\`, "\\`"). Third, and most serious, is that > the new escapes would mean that string literals are not constants but are > instead expressions whose values depend on runtime context, and this would > affect everything: how the byte-compiler works, for example. > > To avoid the most serious problem, I considered a simpler idea: have the Lisp > reader treat \` and \' as curved single quotes in strings. However, this > still has the basic problem of being hard to read. It is needless work to add > a hard-to-read and nearly-ubiquitous feature merely to cater to obsolete > platforms. It's simpler to use quote characters to represent themselves. It is needless work to break existing systems by introducing a deliberate regression. If there is any translation, it should only happen with doc strings at the point that they are prepared for display. Leaving the underlying representation alone and only changng how those strings are presented is far less likely to cause problems. AndyM