GNU bug report logs -
#24468
Emacs 25.1: Use of face escape-glyph on curly quotes is irritating.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Mon, 19 Sep 2016 10:02:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24468 in the body.
You can then email your comments to 24468 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Mon, 19 Sep 2016 10:02:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alan Mackenzie <acm <at> muc.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 19 Sep 2016 10:02:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, Emacs.
In Emacs 25.1, I am using the info files built for the distribution
using texinfo 5 (?or 6). They contain lots of curly quotes.
On my Linux virtual terminal, these are all displayed with the
escape-glyph, which is irritating in the extreme. The workaround of
customizing escape-glyph to the default face would prevent the effect of
highlighting things like \377 and ^L, which is the proper use of
escape-glyph.
The only other workaround I can think of is rebuilding the Emacs info
files with texinfo 4, but that is not a long term option.
This misuse of the escape-glyph face is hardcoded into
startup--setup-quote-display. It shouldn't be.
So, I'm reduced to hacking the source code to get what urgently needs to
be a user option.
Please, can we have this facility, at long last, controlled by a
customisable option?
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Mon, 19 Sep 2016 16:53:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24468 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 19 Sep 2016 10:01:01 +0000
> From: Alan Mackenzie <acm <at> muc.de>
>
> In Emacs 25.1, I am using the info files built for the distribution
> using texinfo 5 (?or 6). They contain lots of curly quotes.
>
> On my Linux virtual terminal, these are all displayed with the
> escape-glyph, which is irritating in the extreme. The workaround of
> customizing escape-glyph to the default face would prevent the effect of
> highlighting things like \377 and ^L, which is the proper use of
> escape-glyph.
This is not supposed to happen. Emacs should test at startup whether
the terminal can display these characters, and if not, replace them by
ASCII equivalents. Please try to figure out why this doesn't work for
you (it does for me, although not on a Linux terminal).
> Please, can we have this facility, at long last, controlled by a
> customisable option?
Let's first understand why the automatic detection doesn't work. IME,
devising a solution for a problem we don't understand is not a good
idea.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Wed, 21 Sep 2016 15:05:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 24468 <at> debbugs.gnu.org (full text, mbox):
Hello, Eli.
On Mon, Sep 19, 2016 at 07:52:16PM +0300, Eli Zaretskii wrote:
> > Date: Mon, 19 Sep 2016 10:01:01 +0000
> > From: Alan Mackenzie <acm <at> muc.de>
> >
> > In Emacs 25.1, I am using the info files built for the distribution
> > using texinfo 5 (?or 6). They contain lots of curly quotes.
> > On my Linux virtual terminal, these are all displayed with the
> > escape-glyph, which is irritating in the extreme. The workaround of
> > customizing escape-glyph to the default face would prevent the effect of
> > highlighting things like \377 and ^L, which is the proper use of
> > escape-glyph.
> This is not supposed to happen. Emacs should test at startup whether
> the terminal can display these characters, and if not, replace them by
> ASCII equivalents. Please try to figure out why this doesn't work for
> you (it does for me, although not on a Linux terminal).
It _is_ "working" for me. The function startup--setup-quote-display
determines that my Linux vt can't display the four curly quote
characters. It's half right (it can display the curly single quotes but
not the curly double quotes).
It then goes on to set up these four characters in the standard display
table, and what it sets up is the equivalent ASCII characters with hard
coded face escape-glyph. It's this last bit I don't like. That bit of
the code looks like this:
(dotimes (i 4)
(let ((char (aref "`'""" i))
(repl (aref repls i)))
(if repl
(aset (or standard-display-table
(setq standard-display-table (make-display-table)))
char (vector (make-glyph-code repl 'escape-glyph))) <=============
(when standard-display-table
(aset standard-display-table char nil)))))
> > Please, can we have this facility, at long last, controlled by a
> > customisable option?
> Let's first understand why the automatic detection doesn't work. IME,
> devising a solution for a problem we don't understand is not a good
> idea.
I think there's no mystery here. Just my original post wasn't too clear.
I would like there to be a user option to decide whether to put the face
'escape-glyph on these four characters, rather than it being hard coded
at start-up time. (I have now commented out "'escape-glyph" in my own
copy of Emacs.)
> Thanks.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Wed, 21 Sep 2016 16:01:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 24468 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 21 Sep 2016 15:04:09 +0000
> Cc: 24468 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm <at> muc.de>
>
> I would like there to be a user option to decide whether to put the face
> 'escape-glyph on these four characters, rather than it being hard coded
> at start-up time. (I have now commented out "'escape-glyph" in my own
> copy of Emacs.)
IMO, just define a separate face for that, and the rest will be
history.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Thu, 22 Sep 2016 18:24:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24468 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> just define a separate face for that
Something like the attached patch, say. Alan, does it work for you?
This patch calls the new face "approximate-glyph" as there are similar
problems with characters other than quotes and we may want to fix them
at some point. For example, currently if I read the Emacs manual by
using M-x info on an ASCII-only terminal, the first screen contains the
off-putting text "Copyright \u00A9 1985\u20131987, 1993\u20132016". If
someone ever gets around to changing this to display (say) "Copyright
(C) 1985-1987, 1993-2016" they can use the approximate-glyph face to
display the ASCII approximations.
[0001-New-face-approximate-glyph.patch (application/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Thu, 22 Sep 2016 18:43:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 24468 <at> debbugs.gnu.org (full text, mbox):
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 24468 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Thu, 22 Sep 2016 11:23:24 -0700
>
> This patch calls the new face "approximate-glyph"
How about asciify-glyph?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Thu, 22 Sep 2016 21:13:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 24468 <at> debbugs.gnu.org (full text, mbox):
>> This patch calls the new face "approximate-glyph"
>
> How about asciify-glyph?
Or confusable-glyph (if this is the right Unicode term)?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Thu, 22 Sep 2016 21:17:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 24468 <at> debbugs.gnu.org (full text, mbox):
On 09/22/2016 11:42 AM, Eli Zaretskii wrote:
> How about asciify-glyph?
The substitute glyphs might not be ASCII in the future. For example, on
Fedora 24 the console font 'cp1250' can display µ (U+00B5 MICRO SIGN)
but not μ (U+03BC GREEK SMALL LETTER MU), and it would be quite
reasonable for a future version of Emacs to display the latter as the
former using the approximation-glyph font.
It's true that the name 'approximation-glyph' is long and hard to spell.
Perhaps we can think of a better font name that doesn't imply ASCII. How
about 'homo-glyph'? That is more technically accurate anyway, as this
feature is all about homoglyphs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24468
; Package
emacs
.
(Fri, 23 Sep 2016 07:04:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 24468 <at> debbugs.gnu.org (full text, mbox):
> Cc: acm <at> muc.de, 24468 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Thu, 22 Sep 2016 14:15:53 -0700
>
> It's true that the name 'approximation-glyph' is long and hard to spell.
My problem with it is not that it's long, my problem is that it's too
general. "Approximation" could mean anything.
> Perhaps we can think of a better font name that doesn't imply ASCII. How
> about 'homo-glyph'? That is more technically accurate anyway, as this
> feature is all about homoglyphs.
Fine with me, thanks.
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Mon, 17 Oct 2016 05:54:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Alan Mackenzie <acm <at> muc.de>
:
bug acknowledged by developer.
(Mon, 17 Oct 2016 05:54:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 24468-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii wrote:
>> > How about 'homo-glyph'? That is more technically accurate anyway, as this
>> > feature is all about homoglyphs.
> Fine with me, thanks.
I installed it as 'homoglyph' via the attached patch, since when I wrote it up
'homo-glyph' was confusing: the English word is 'homoglyph' after all.
[0001-New-face-homoglyph.patch (text/x-diff, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 14 Nov 2016 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.