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


Message #20 received at 20707 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 20707 <at> debbugs.gnu.org
Subject: Re: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated
 errors
Date: Mon, 1 Jun 2015 17:17:23 +0000
Hello, Paul.

On Mon, Jun 01, 2015 at 09:01:08AM -0700, Paul Eggert wrote:
> On 06/01/2015 03:49 AM, Alan Mackenzie wrote:
> > Currently, we can grep C source code (whether on the command line or
> > within Emacs), specifically specifying quote characters like " (even if
> > they have to be escaped).

> Having just gone through this exercise, I can say that it doesn't work 
> as well as I had hoped.  Characters are sometimes escaped, sometimes 
> not, and even something easy like searching for '`' finds many false 
> hits in comments.

> > OK, there may be some arcane way of specifying these curly quotes

> Hmm, well, it's not arcane for me.  This shell command:

>     grep ‘ *.c

That begs the question how do you type that left curly quote.  I have no
way of doing so on my keyboard.  Having to memorise a 4 digit hex value
would count as arcane for me.

In mutt, that curly quote displays as `.  However, searching for the
ASCII back tick (correctly) fails to find it.  This is disconcerting.
Dumping the text to a file, visiting that file in Emacs and C-u C-x =
shows the character to be LEFT SINGLE QUOTATION MARK, 0x2018.

> generates all .c lines that contain left single quotation mark in a 
> string (after the proposed patch is applied).  This is simpler than any 
> shell command to find apostrophe or double-quote or grave accent.

> > Curly quotes display as ? on my terminal, sometimes inverted.

> That's not good.  What terminal are you using, and why does it not 
> handle UTF-8?

I use the Linux virtual terminal:

    $TERM = linux
    consolefont="lat1-16"

It doesn't handle UTF-8, because I never put in the effort to make it do
so.  Looking at the available fonts in /usr/share/consolefonts, there
isn't one whose name looks like "utf" or "uni", except for four with
names beginning with "UniCyr", which probably means something like "UTF
Cyrillic".

> What is your operating system and locale settings?

(Gentoo) GNU/Linux with:

    $LANG = en_GB.utf8

, none of the LC_ variables being set.

> If this is a common problem among Emacs developers, I suppose we'll
> have to come up with a different way.

-- 
Alan Mackenzie (Nuremberg, Germany).




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.