unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 20707@debbugs.gnu.org
Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors
Date: Fri, 12 Jun 2015 11:25:39 +0000	[thread overview]
Message-ID: <20150612112539.GA3220@acm.fritz.box> (raw)
In-Reply-To: <557A46F2.50201@cs.ucla.edu>

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 <http://bugs.gnu.org/20707>.  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).





  reply	other threads:[~2015-06-12 11:25 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01  7:39 bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors Paul Eggert
     [not found] ` <mailman.4052.1433144480.904.bug-gnu-emacs@gnu.org>
2015-06-01 10:49   ` Alan Mackenzie
2015-06-01 16:01     ` Paul Eggert
2015-06-01 17:17       ` Alan Mackenzie
2015-06-01 18:50         ` Paul Eggert
2015-06-02 11:56           ` Alan Mackenzie
2015-06-02 13:25             ` Drew Adams
2015-06-02 15:39             ` Paul Eggert
2015-06-02 15:51               ` Dmitry Gutov
2015-06-02 20:05                 ` Paul Eggert
2015-06-02 17:07               ` Alan Mackenzie
2015-06-02 20:44                 ` Alan Mackenzie
2015-06-04 15:43                   ` Paul Eggert
2015-06-06 15:54                     ` Alan Mackenzie
2015-06-06 18:11                       ` Paul Eggert
2015-06-06 20:50                         ` Alan Mackenzie
2015-06-07  0:09                           ` Paul Eggert
2015-06-08 17:18                             ` Alan Mackenzie
2015-06-09  6:53                               ` Paul Eggert
2015-06-09 13:34                                 ` Alan Mackenzie
2015-06-09 20:49                                   ` Paul Eggert
2015-06-09 22:46                                     ` Alan Mackenzie
2015-06-09 23:42                                       ` Paul Eggert
2015-06-10 13:39                                         ` Alan Mackenzie
2015-06-10 16:20                                           ` Paul Eggert
2015-06-10 17:39                                             ` Dmitry Gutov
2015-06-10 19:42                                               ` Paul Eggert
2015-06-10 19:17                                             ` Alan Mackenzie
2015-06-10 19:44                                               ` Paul Eggert
2015-06-11 19:06                                                 ` Alan Mackenzie
2015-06-12  2:41                                                   ` Paul Eggert
2015-06-12 11:25                                                     ` Alan Mackenzie [this message]
2015-06-12 23:46                                                       ` Paul Eggert
2015-06-13 11:54                                                         ` Alan Mackenzie
2015-06-13 17:54                                                           ` Paul Eggert
2015-06-07 13:17                       ` Wolfgang Jenkner
2015-06-09 16:58                         ` Alan Mackenzie
2015-06-02 23:26                 ` Paul Eggert
2015-06-01 14:34 ` Eli Zaretskii
2015-06-01 16:48   ` Glenn Morris
2015-06-01 17:55   ` Paul Eggert
2015-06-01 18:29     ` Eli Zaretskii
2015-06-01 21:13     ` Stefan Monnier
2015-06-09 19:44 ` Wolfgang Jenkner
2015-06-11 13:06 ` bug#20707: " Andy Moreton
2020-08-12 13:02 ` bug#20707: [PROPOSED PATCH] " Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150612112539.GA3220@acm.fritz.box \
    --to=acm@muc.de \
    --cc=20707@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).