GNU bug report logs - #28242
Batch mode compiling: Error messages are displayed with "invalid character" glyph bounding symbols.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sat, 26 Aug 2017 13:09:01 UTC

Severity: wishlist

Tags: wontfix

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

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 28242 in the body.
You can then email your comments to 28242 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sat, 26 Aug 2017 13:09: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. (Sat, 26 Aug 2017 13:09:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Batch mode compiling: Error messages are displayed with "invalid
 character" glyph bounding symbols.
Date: Sat, 26 Aug 2017 13:06:08 +0000
Hello, Emacs.

On my new PC (Gentoo GNU/Linux), byte compiling in batch mode (e.g. with
make bootstrap in the master branch) is displaying warning messages with
symbols "quoted" by the invalid character glyph (a solid square) rather
than ` and '.  Presumably Emacs is attempting to use single curly
quotes.

This is ugly and not helpful.  A fix would be appreciated.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sat, 26 Aug 2017 14:10:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed with
 "invalid character" glyph bounding symbols.
Date: Sat, 26 Aug 2017 17:09:17 +0300
> Date: Sat, 26 Aug 2017 13:06:08 +0000
> From: Alan Mackenzie <acm <at> muc.de>
> 
> On my new PC (Gentoo GNU/Linux), byte compiling in batch mode (e.g. with
> make bootstrap in the master branch) is displaying warning messages with
> symbols "quoted" by the invalid character glyph (a solid square) rather
> than ` and '.  Presumably Emacs is attempting to use single curly
> quotes.
> 
> This is ugly and not helpful.  A fix would be appreciated.

You need to figure out why the logic in startup--setup-quote-display
isn't working in your case.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sat, 26 Aug 2017 17:10:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sat, 26 Aug 2017 17:06:59 +0000
Hello, Eli.

On Sat, Aug 26, 2017 at 17:09:17 +0300, Eli Zaretskii wrote:
> > Date: Sat, 26 Aug 2017 13:06:08 +0000
> > From: Alan Mackenzie <acm <at> muc.de>
> > 
> > On my new PC (Gentoo GNU/Linux), byte compiling in batch mode (e.g. with
> > make bootstrap in the master branch) is displaying warning messages with
> > symbols "quoted" by the invalid character glyph (a solid square) rather
> > than ` and '.  Presumably Emacs is attempting to use single curly
> > quotes.
> > 
> > This is ugly and not helpful.  A fix would be appreciated.

> You need to figure out why the logic in startup--setup-quote-display
> isn't working in your case.

I don't think the calling of that function is pertinent; there is only
one call of it, and that is inside "(unless noninteractive ...)".
Presumably noninterative will be non-nil in batch mode.

Perhaps the problem is that that function (or some equivalent) isn't
being called, and Emacs is outputting non-displayable characters
regardless.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sat, 26 Aug 2017 18:13:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sat, 26 Aug 2017 21:12:04 +0300
> Date: Sat, 26 Aug 2017 17:06:59 +0000
> Cc: 28242 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm <at> muc.de>
> 
> Perhaps the problem is that that function (or some equivalent) isn't
> being called, and Emacs is outputting non-displayable characters
> regardless.

No, I think the problem is in the function using_utf8, called from
'main'.  Does it return true in your case?  If so, what does
terminal-coding-system return in your case in the -batch invocation,
and what is the value of locale-coding-system in that case?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sat, 26 Aug 2017 19:28:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sat, 26 Aug 2017 19:24:31 +0000
Hello, Eli.

On Sat, Aug 26, 2017 at 21:12:04 +0300, Eli Zaretskii wrote:
> > Date: Sat, 26 Aug 2017 17:06:59 +0000
> > Cc: 28242 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm <at> muc.de>

> > Perhaps the problem is that that function (or some equivalent) isn't
> > being called, and Emacs is outputting non-displayable characters
> > regardless.

> No, I think the problem is in the function using_utf8, called from
> 'main'.  Does it return true in your case?

I haven't worked out how to hook up gdb to a batch mode Emacs yet, but
surely using_utf8 will return non-zero.  I _am_ using utf8.

> If so, what does terminal-coding-system return in your case in the
> -batch invocation, and what is the value of locale-coding-system in
> that case?

In an interactive session, terminal-coding-system is utf-8-unix and
locale-coding-system is also utf-8-unix.

But I would be disturbed if my batch mode session didn't report
utf-8-unix, or something similar.  It's running on an up to date
GNU/Linux system.

Surely Emacs doesn't assume from the use of UTF8 that curly quotes are
displayable?  Those quotes are merely two characters from several
hundred thousand, and not all of these are going to be displayable.  On
a Linux tty, as I use, there is a maximum of 256 displayable glyphs.
Most UTF8 characters aren't displayable.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sat, 26 Aug 2017 19:41:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sat, 26 Aug 2017 22:40:04 +0300
> Date: Sat, 26 Aug 2017 19:24:31 +0000
> Cc: 28242 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm <at> muc.de>
> 
> > No, I think the problem is in the function using_utf8, called from
> > 'main'.  Does it return true in your case?
> 
> I haven't worked out how to hook up gdb to a batch mode Emacs yet

 $ gdb ./emacs
 ...
 (gdb) break using_utf8
 (gdb) r -batch ... <rest of arguments here>

> > If so, what does terminal-coding-system return in your case in the
> > -batch invocation, and what is the value of locale-coding-system in
> > that case?
> 
> In an interactive session, terminal-coding-system is utf-8-unix and
> locale-coding-system is also utf-8-unix.
> 
> But I would be disturbed if my batch mode session didn't report
> utf-8-unix, or something similar.  It's running on an up to date
> GNU/Linux system.

If you locale's codeset is UTF-8, then how come your terminal cannot
display those quote characters?

> Surely Emacs doesn't assume from the use of UTF8 that curly quotes are
> displayable?  Those quotes are merely two characters from several
> hundred thousand, and not all of these are going to be displayable.  On
> a Linux tty, as I use, there is a maximum of 256 displayable glyphs.
> Most UTF8 characters aren't displayable.

We are not interested in all of the Unicode characters, we are only
interested in a few of them.

Anyway, I think it works for everyone else, the question is why
doesn't it work for you?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sat, 26 Aug 2017 20:43:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sat, 26 Aug 2017 20:39:56 +0000
Hello, Eli.

On Sat, Aug 26, 2017 at 22:40:04 +0300, Eli Zaretskii wrote:
> > Date: Sat, 26 Aug 2017 19:24:31 +0000
> > Cc: 28242 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm <at> muc.de>

> > > No, I think the problem is in the function using_utf8, called from
> > > 'main'.  Does it return true in your case?

> > I haven't worked out how to hook up gdb to a batch mode Emacs yet

>  $ gdb ./emacs
>  ...
>  (gdb) break using_utf8
>  (gdb) r -batch ... <rest of arguments here>

> > > If so, what does terminal-coding-system return in your case in the
> > > -batch invocation, and what is the value of locale-coding-system in
> > > that case?

> > In an interactive session, terminal-coding-system is utf-8-unix and
> > locale-coding-system is also utf-8-unix.

> > But I would be disturbed if my batch mode session didn't report
> > utf-8-unix, or something similar.  It's running on an up to date
> > GNU/Linux system.

> If you locale's codeset is UTF-8, then how come your terminal cannot
> display those quote characters?

The particular font in use (I haven't configured one since setting up
this new box) simply doesn't have mappings for the curlies.  I don't know
why that should be.  My one theory is that the designer of the font
decided to use a long diagonal line rather than a reversed comma shape
for grave (`), making it unsuitable for doubling up as the left curly
quote.  Or something like that.

But there are likely many, many PCs around using this font, or others
like it.

> > Surely Emacs doesn't assume from the use of UTF8 that curly quotes are
> > displayable?  Those quotes are merely two characters from several
> > hundred thousand, and not all of these are going to be displayable.  On
> > a Linux tty, as I use, there is a maximum of 256 displayable glyphs.
> > Most UTF8 characters aren't displayable.

> We are not interested in all of the Unicode characters, we are only
> interested in a few of them.

> Anyway, I think it works for everyone else, the question is why
> doesn't it work for you?

I haven't (yet) set up a terminal font for Emacs, I'm just using some
default font.  Everything else, so far, seems to work with it.  It seems
to me the problem is that Emacs is outputting curly quotes to the screen
without having determined that they can be displayed properly.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 08:18:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 01:16:45 -0700
What happens if you run the following shell commands?

echo invalid program >t.c
gcc t.c

On my machine GCC outputs diagnostics with curved quotes, like this:

t.c:1:1: error: unknown type name ‘invalid’
...

What do you see on your console? If you see solid squares or other glitches 
rather than curved quotes, then the problem is not specific to Emacs.


> On my new PC (Gentoo GNU/Linux), byte compiling in batch mode (e.g. with
> make bootstrap in the master branch) is displaying warning messages with
> symbols "quoted" by the invalid character glyph (a solid square) rather
> than ` and '.
...
> My one theory is that the designer of the font
> decided to use a long diagonal line rather than a reversed comma shape
> for grave (`),

These two passages seem inconsistent. One says you’re seeing a solid square; the 
other a long diagonal line.

For what it’s worth, I don’t observe the problem on my Ubuntu 16.04.3 LTS 
console. I see curved quotes. I don’t remember doing anything to configure my 
console. Here is my /etc/default/console-setup file: it may help you to set up 
your computer. On Ubuntu, the command ‘sudo dpkg-reconfigure console-setup’ 
configures this file.

# CONFIGURATION FILE FOR SETUPCON

# Consult the console-setup(5) manual page.

ACTIVE_CONSOLES="/dev/tty[1-6]"

CHARMAP="UTF-8"

CODESET="guess"
FONTFACE="Fixed"
FONTSIZE="8x16"

VIDEOMODE=

# The following is an example how to use a braille font
# FONT='lat9w-08.psf.gz brl-8x8.psf'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 09:20:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 09:16:54 +0000
Hello, Paul.

On Sun, Aug 27, 2017 at 01:16:45 -0700, Paul Eggert wrote:
[ .... ]

> > On my new PC (Gentoo GNU/Linux), byte compiling in batch mode (e.g. with
> > make bootstrap in the master branch) is displaying warning messages with
> > symbols "quoted" by the invalid character glyph (a solid square) rather
> > than ` and '.

[ .... ]

> For what it’s worth, I don’t observe the problem on my Ubuntu 16.04.3 LTS 
> console. I see curved quotes. I don’t remember doing anything to configure my 
> console. Here is my /etc/default/console-setup file: it may help you to set up 
> your computer.

This bug report is not about setting up _my_ computer.  It's an attempt
to make Emacs compatible with what's out there in the field.  Emacs
should not require a special console setup to display error and warning
messages properly.

I think the font in use on my new box must be part of Linux itself,
rather than being a default chosen by Gentoo and then loaded during
booting.  Emacs ought to be compatible with Linux.

Why are these curly quotes being output without first checking that the
device they're being output to can display them?

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 14:41:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed with
 "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 17:40:26 +0300
> Date: Sun, 27 Aug 2017 09:16:54 +0000
> From: Alan Mackenzie <acm <at> muc.de>
> Cc: 28242 <at> debbugs.gnu.org
> 
> Why are these curly quotes being output without first checking that the
> device they're being output to can display them?

Paul, is it possible to use for this purpose a technique similar to
what you coded in calculate_glyph_code_table?  That is, call that
special ioctl function, then look in the mapping it returns for the
curly quote characters, and if they aren't there, reset
text_quoting_flag?  Would that work?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 16:41:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 09:40:48 -0700
Alan Mackenzie wrote:
> Why are these curly quotes being output without first checking that the
> device they're being output to can display them?

Please test whether GCC generates curved quotes in the same environment, using 
the recipe I suggested in my previous email. That could help us diagnose the 
problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 16:47:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>, Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 09:46:32 -0700
Eli Zaretskii wrote:
> is it possible to use for this purpose a technique similar to
> what you coded in calculate_glyph_code_table?  That is, call that
> special ioctl function, then look in the mapping it returns for the
> curly quote characters, and if they aren't there, reset
> text_quoting_flag?  Would that work?

Although it might work if Emacs is run directly from a Linux console, I doubt 
whether it'd work in general. The ioctl needs a file descriptor, and which file 
descriptor should Emacs try? Stdout? Stderr? What if the output of Emacs is 
being sent to a file or pipe, and some other program later displays the text?

I'd like to see what GCC does before worrying about this too much. Also I'd like 
to know why Alan sometimes sees block squares and sometimes diagonal lines.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 16:48:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 12:47:21 -0400
If your system has the same issue with gcc warnings (and if you choose
not to answer the question, a cynic like me will assume it does), then
your system is misconfigured, and it's not important to improve Emacs's
support for it.

Don't set LANG to a UTF8 locale if your font doesn't support it.
gcc went through the same issue years ago. Eg

https://stackoverflow.com/questions/6537520/strange-characters-present-in-gcc-compilation-output-message-on-console




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 17:00:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 16:56:46 +0000
On Sun, Aug 27, 2017 at 09:40:48 -0700, Paul Eggert wrote:
> Alan Mackenzie wrote:
> > Why are these curly quotes being output without first checking that the
> > device they're being output to can display them?

> Please test whether GCC generates curved quotes in the same environment, using 
> the recipe I suggested in my previous email. That could help us diagnose the 
> problem.

This is the Emacs list, not the GCC list.  The problem is already
diagnosed: Emacs is outputting non-displayable characters.

Now please answer the question: why are curly quotes being output without
first checking that the device they're being output to can display them?

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 17:08:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 28242 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 17:05:04 +0000
Hello, Glenn.

On Sun, Aug 27, 2017 at 12:47:21 -0400, Glenn Morris wrote:

> If your system has the same issue with gcc warnings (and if you choose
> not to answer the question, a cynic like me will assume it does), ...

It does.

> ... then your system is misconfigured, and it's not important to
> improve Emacs's support for it.

I've looked into this.  My system is currently using the standard Linux
font, the one baked into the kernel.  I would have thought it rather
important to support properly - there will be lots of similarly
"misconfigured" systems around.

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 17:22:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: rgm <at> gnu.org, eggert <at> cs.ucla.edu, 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed with
 "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 20:21:24 +0300
> Date: Sun, 27 Aug 2017 17:05:04 +0000
> From: Alan Mackenzie <acm <at> muc.de>
> Cc: 28242 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
> 
> I've looked into this.  My system is currently using the standard Linux
> font, the one baked into the kernel.  I would have thought it rather
> important to support properly - there will be lots of similarly
> "misconfigured" systems around.

What non-ASCII characters does that font support?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 17:26:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 28242 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 17:23:10 +0000
Hello, Paul.

On Sun, Aug 27, 2017 at 09:46:32 -0700, Paul Eggert wrote:
> Eli Zaretskii wrote:
> > is it possible to use for this purpose a technique similar to
> > what you coded in calculate_glyph_code_table?  That is, call that
> > special ioctl function, then look in the mapping it returns for the
> > curly quote characters, and if they aren't there, reset
> > text_quoting_flag?  Would that work?

> Although it might work if Emacs is run directly from a Linux console, I doubt 
> whether it'd work in general.

Does it need to work in general?  Other methods are clearly not working
at all, in general.

> The ioctl needs a file descriptor, and which file descriptor should
> Emacs try? Stdout? Stderr?

Both.  If both are known to be able to display curlies, use them,
otherwise stick to the ASCII quotes.

> What if the output of Emacs is being sent to a file or pipe, and some
> other program later displays the text?

Play it safe.  Somebody redirecting output to a file is going to want to
analyse it.  Make it easy for that person, and use the ASCII quote
characters.

> I'd like to see what GCC does before worrying about this too much. Also I'd like 
> to know why Alan sometimes sees block squares and sometimes diagonal lines.

Block squares arise from an attempt to display curly quotes and other
undisplayable characters.  Diagonal lines are the font's representation
of ASCII grave (0x60), and arise from typing the key to the left of "1".

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 17:35:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rgm <at> gnu.org, eggert <at> cs.ucla.edu, 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 17:31:31 +0000
Hello, Eli.

On Sun, Aug 27, 2017 at 20:21:24 +0300, Eli Zaretskii wrote:
> > Date: Sun, 27 Aug 2017 17:05:04 +0000
> > From: Alan Mackenzie <acm <at> muc.de>
> > Cc: 28242 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>

> > I've looked into this.  My system is currently using the standard Linux
> > font, the one baked into the kernel.  I would have thought it rather
> > important to support properly - there will be lots of similarly
> > "misconfigured" systems around.

> What non-ASCII characters does that font support?

Let me cite the comment at the top of the pertinent Linux source file,
/usr/src/linux-4.13-rc3/drivers/tty/vt/cp437.uni:

#
# Unicode table for IBM Codepage 437.  Note that there are many more
# substitutions that could be conceived (for example, thick-line
# graphs probably should be replaced with double-line ones, accented
# Latin characters should replaced with their nonaccented versions,
# and some upper case Greek characters could be replaced by Latin),
# however,
# I have limited myself to the Unicodes used by the kernel ISO 8859-1,
# DEC VT, and IBM CP 437 tables.
#

It seems to be mainly ASCII, Latin-1, with lots of miscellaneous
graphics characters, including the single and double line thingies,
sufficient to support mutt, for example.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 17:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: rgm <at> gnu.org, eggert <at> cs.ucla.edu, 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 20:50:02 +0300
> Date: Sun, 27 Aug 2017 17:31:31 +0000
> Cc: rgm <at> gnu.org, 28242 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
> From: Alan Mackenzie <acm <at> muc.de>
> 
> # Unicode table for IBM Codepage 437.

Hilarious.  DOS is dead for so many years, and Linux couldn't come up
with anything better than the worst DOS codepage in history...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 17:55:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: acm <at> muc.de, 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 20:53:32 +0300
> Cc: 28242 <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Sun, 27 Aug 2017 09:46:32 -0700
> 
> The ioctl needs a file descriptor, and which file 
> descriptor should Emacs try? Stdout? Stderr?

We are talking about messages in -batch, so stderr.

> What if the output of Emacs is 
> being sent to a file or pipe, and some other program later displays the text?

I don't think we should care.  The primary goal is to have batch-mode
messages to the screen display legibly.  If another program later
examines the results, it's a problem for that other program.  In
particular, if that other program is Emacs, we already have the
solution for displaying these quotes in interactive sessions.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 18:44:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alan Mackenzie <acm <at> muc.de>, Glenn Morris <rgm <at> gnu.org>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 11:43:16 -0700
Alan Mackenzie wrote:
> On Sun, Aug 27, 2017 at 12:47:21 -0400, Glenn Morris wrote:
> 
>> If your system has the same issue with gcc warnings (and if you choose
>> not to answer the question, a cynic like me will assume it does), ...
su
> It does.

Then you'll need to fix your setup to get GCC working, as well as Emacs.


> Diagonal lines are the font's representation
> of ASCII grave (0x60), and arise from typing the key to the left of "1".

So this font cannot even display ASCII? Another annoyance. While you're fixing 
that you might as well fix the curved quotes.

I don't see this as rising to something that we need to worry about. Emacs is 
behaving consistently with other programs. Even with the display glitches, the 
batch diagnostics are still quite intelligible, so the glitches are merely an 
annoyance.

If despite my advice we decide to support this misconfigured font, then we need 
to change the default batch quoting style to 'straight', not 'grave'. This is 
because the font in question cannot display grave accent either. It would be a 
simple matter to use the 'straight' quoting style for all batch invocations. I'm 
not in favor of this, though.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 19:07:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 19:04:04 +0000
Hello, Paul.

On Sun, Aug 27, 2017 at 11:43:16 -0700, Paul Eggert wrote:
> Alan Mackenzie wrote:
> > On Sun, Aug 27, 2017 at 12:47:21 -0400, Glenn Morris wrote:

> >> If your system has the same issue with gcc warnings (and if you choose
> >> not to answer the question, a cynic like me will assume it does), ...

> > It does.

> Then you'll need to fix your setup to get GCC working, as well as Emacs.

I will get around to that in good time.  It remains a problem for all
those working with the standard Linux font.

> > Diagonal lines are the font's representation
> > of ASCII grave (0x60), and arise from typing the key to the left of "1".

> So this font cannot even display ASCII?

It can.  I suggest you try it out first, before making such wild
statements.

> Another annoyance. While you're fixing that you might as well fix the
> curved quotes.

> I don't see this as rising to something that we need to worry about. Emacs is 
> behaving consistently with other programs.

There was a time when Emacs was a leader, not a follower.  Seems such
times have passed.

> Even with the display glitches, the batch diagnostics are still quite
> intelligible, so the glitches are merely an annoyance.

Annoyances should be fixed.  It's the lack of annoyances which makes (or
made) Emacs such an attractive program in the first place.

> If despite my advice we decide to support this misconfigured font, then we need 
> to change the default batch quoting style to 'straight', not 'grave'. This is 
> because the font in question cannot display grave accent either.

Stop being idiotic.

> It would be a simple matter to use the 'straight' quoting style for
> all batch invocations. I'm not in favor of this, though.

How about allowing the user to configure this, in good old fashioned
Emacs fashion?

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Sun, 27 Aug 2017 21:39:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Sun, 27 Aug 2017 14:38:12 -0700
Alan Mackenzie wrote:

>> Then you'll need to fix your setup to get GCC working, as well as Emacs.
> 
> I will get around to that in good time.

When that happens, the issue should be fixed for both GCC and Emacs, even in an 
UTF-8 locale.

> It remains a problem for all
> those working with the standard Linux font.

It is by no means the "standard" font. Hardly anybody uses it on Linux any more. 
I have to go to some work to try it out myself, on either Ubuntu or Fedora. The 
few people who use Linux console fonts are generally aware of these issues and 
it is not hard to address them.

> There was a time when Emacs was a leader, not a follower.

In this case the issue seems to be whether Emacs should "lead" us back to the 
1980s, when PCs had inferior fonts.

> Stop being idiotic.

It is not at all an idiotic suggestion. ISO 646 permits countries to usurp grave 
accent. For example, old-design French monitors display grave accent as a micro 
sign (µ), to conform to the French NF Z 62-010 profile for ISO 646. Again, I 
don't think Emacs should take trouble to cater to old designs like this. 
However, if we do it then it's safer and more portable for Emacs to avoid 
routine use of grave accent in its batch diagnostics, as grave accent is 
mishandled more often than apostrophe is. This is because ISO 646 usurps grave 
accent but not apostrophe.

> How about allowing the user to configure this

It is configurable already; just set LC_ALL=C in the environment. This should 
fix the issue for both Emacs and GCC.

PS. Rhetoric like "Stop being idiotic" is not helpful here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28242; Package emacs. (Thu, 20 Aug 2020 16:01:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: acm <at> muc.de, Paul Eggert <eggert <at> cs.ucla.edu>, 28242 <at> debbugs.gnu.org
Subject: Re: bug#28242: Batch mode compiling: Error messages are displayed
 with "invalid character" glyph bounding symbols.
Date: Thu, 20 Aug 2020 17:59:58 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> What if the output of Emacs is 
>> being sent to a file or pipe, and some other program later displays the text?
>
> I don't think we should care.  The primary goal is to have batch-mode
> messages to the screen display legibly.  If another program later
> examines the results, it's a problem for that other program.  In
> particular, if that other program is Emacs, we already have the
> solution for displaying these quotes in interactive sessions.

If I skim this thread correctly, I think the general sentiment was that
this wasn't something that should be fixed, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 20 Aug 2020 16:01:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 28242 <at> debbugs.gnu.org and Alan Mackenzie <acm <at> muc.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 20 Aug 2020 16:01:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 Sep 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 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.