GNU bug report logs - #20707
[PROPOSED PATCH] Use curved quoting in C-generated errors

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Mon, 1 Jun 2015 07:41:05 UTC

Severity: wishlist

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 20707 <at> debbugs.gnu.org
Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors
Date: Wed, 10 Jun 2015 09:20:26 -0700
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.  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).

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 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.

> 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.

> Again, I think the only justification for the change you've given is that
> you personally don't like the look

It's not just me personally.  The rest of the world has moved on.  At this point 
when outsiders look at Emacs they see mysterious and inappropriate and 
off-putting quoting.  And this sort of thing has been happening for a while. 
See, for example:

http://www.trilithium.com/johan/2005/07/quotation-marks/




This bug report was last modified 4 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.