bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors


From: Paul Eggert
Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors
Date: Wed, 10 Jun 2015 09:20:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]