* Question regarding tty special glyphs display defaults
@ 2024-10-09 4:24 Gerd Möllmann
2024-10-09 12:44 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Möllmann @ 2024-10-09 4:24 UTC (permalink / raw)
To: Emacs Devel
On a tty, certain special glyphs are displayed with either ASCII chars
or glyphs from standard-display-table, if set. Using ASCII is the
default.
The special glyphs are (see disp-table.el):
truncation
wrap
escape
control
selective-display
vertical-border
And with tty child frames some more for their borders:
box-vertical
box-horizontal
box-down-right
box-down-left
box-up-right
box-up-left
Problem is that I find the default ASCII chars being used ugly as hell,
at least the ones for vertical-border and the new ones for the borders
of child frames. The truncation...selective-display glyphs are kind of
okay for my personal taste.
I'm pondering if we could change the defaults to Unicode box drawing
chars falling back to the ASCII chars if the terminal output coding
system isn't Unicode.
Q1: WDYT?
Q2: if the answer is positive, how the heck does one write a function
like is_unicode (struct coding_system *)?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question regarding tty special glyphs display defaults
2024-10-09 4:24 Question regarding tty special glyphs display defaults Gerd Möllmann
@ 2024-10-09 12:44 ` Eli Zaretskii
2024-10-09 13:48 ` Gerd Möllmann
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-10-09 12:44 UTC (permalink / raw)
To: Gerd Möllmann; +Cc: emacs-devel
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Date: Wed, 09 Oct 2024 06:24:35 +0200
>
> Problem is that I find the default ASCII chars being used ugly as hell,
> at least the ones for vertical-border and the new ones for the borders
> of child frames. The truncation...selective-display glyphs are kind of
> okay for my personal taste.
>
> I'm pondering if we could change the defaults to Unicode box drawing
> chars falling back to the ASCII chars if the terminal output coding
> system isn't Unicode.
>
> Q1: WDYT?
Using Unicode (or non-ASCII in general) on text terminals is
problematic, because we need to establish whether a character is
supported before using it, and text terminals differ wildly in that
aspect. We have char-displayable-p, but it is not 100% reliable
(except if you are on the Linux console, for which we have special
support), so using this by default is not reliable, either.
Why cannot this be left to user customizations, leaving the ("ugly as
hell") ASCII characters as the default, since those are reliably
displayed?
> Q2: if the answer is positive, how the heck does one write a function
> like is_unicode (struct coding_system *)?
I don't understand why you need this. Please tell more (or maybe
char-displayable-p is the answer you were looking for, without
actually asking it ;-).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question regarding tty special glyphs display defaults
2024-10-09 12:44 ` Eli Zaretskii
@ 2024-10-09 13:48 ` Gerd Möllmann
2024-10-09 14:08 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Möllmann @ 2024-10-09 13:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>> Date: Wed, 09 Oct 2024 06:24:35 +0200
>>
>> Problem is that I find the default ASCII chars being used ugly as hell,
>> at least the ones for vertical-border and the new ones for the borders
>> of child frames. The truncation...selective-display glyphs are kind of
>> okay for my personal taste.
>>
>> I'm pondering if we could change the defaults to Unicode box drawing
>> chars falling back to the ASCII chars if the terminal output coding
>> system isn't Unicode.
>>
>> Q1: WDYT?
>
> Using Unicode (or non-ASCII in general) on text terminals is
> problematic, because we need to establish whether a character is
> supported before using it, and text terminals differ wildly in that
> aspect. We have char-displayable-p, but it is not 100% reliable
> (except if you are on the Linux console, for which we have special
> support), so using this by default is not reliable, either.
Ah thanks, that's what I was looking for and couldn't find.
> Why cannot this be left to user customizations, leaving the ("ugly as
> hell") ASCII characters as the default, since those are reliably
> displayed?
I'm just wondering if one could do better. I think the Unicode box
drawing characters like U+2502 '│' instead of '|' for example are quite
commonly used in terminal programs. And they produce a much nicer
display. On my system I sometimes have to take a second look to see
if I have a GUI version in front of me or not (it's the modeline that
is slightly different).
Hm, don't know, if you don't want that, it's of course okay. I have my
setup already as I like it.
>> Q2: if the answer is positive, how the heck does one write a function
>> like is_unicode (struct coding_system *)?
>
> I don't understand why you need this. Please tell more (or maybe
> char-displayable-p is the answer you were looking for, without
> actually asking it ;-).
Indeed, char-displayable-p is what I was looking for :-). Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question regarding tty special glyphs display defaults
2024-10-09 13:48 ` Gerd Möllmann
@ 2024-10-09 14:08 ` Eli Zaretskii
2024-10-09 15:03 ` Gerd Möllmann
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-10-09 14:08 UTC (permalink / raw)
To: Gerd Möllmann; +Cc: emacs-devel
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 09 Oct 2024 15:48:58 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Using Unicode (or non-ASCII in general) on text terminals is
> > problematic, because we need to establish whether a character is
> > supported before using it, and text terminals differ wildly in that
> > aspect. We have char-displayable-p, but it is not 100% reliable
> > (except if you are on the Linux console, for which we have special
> > support), so using this by default is not reliable, either.
>
> Ah thanks, that's what I was looking for and couldn't find.
>
> > Why cannot this be left to user customizations, leaving the ("ugly as
> > hell") ASCII characters as the default, since those are reliably
> > displayed?
>
> I'm just wondering if one could do better. I think the Unicode box
> drawing characters like U+2502 '│' instead of '|' for example are quite
> commonly used in terminal programs.
I'm guessing you have terminal emulators in mind. Those indeed use
GUI fonts, where these characters are usually available. But I was
talking about real console devices, where that is not necessarily
true. We don't default to U+2502 '│' in fill-column-indicator-mode
for that reason.
> And they produce a much nicer display. On my system I sometimes have
> to take a second look to see if I have a GUI version in front of me
> or not (it's the modeline that is slightly different).
>
> Hm, don't know, if you don't want that, it's of course okay. I have my
> setup already as I like it.
I'm saying that doing that by default would be problematic. We can
provide a defcustom or a minor mode which would replace these
characters, and let users who know their terminals can display those
use those opt-in features.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question regarding tty special glyphs display defaults
2024-10-09 14:08 ` Eli Zaretskii
@ 2024-10-09 15:03 ` Gerd Möllmann
0 siblings, 0 replies; 5+ messages in thread
From: Gerd Möllmann @ 2024-10-09 15:03 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> I'm saying that doing that by default would be problematic. We can
> provide a defcustom or a minor mode which would replace these
> characters, and let users who know their terminals can display those
> use those opt-in features.
That's okay. I'll leave doing that to someone else.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-09 15:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 4:24 Question regarding tty special glyphs display defaults Gerd Möllmann
2024-10-09 12:44 ` Eli Zaretskii
2024-10-09 13:48 ` Gerd Möllmann
2024-10-09 14:08 ` Eli Zaretskii
2024-10-09 15:03 ` Gerd Möllmann
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).