bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45230: /bug#45231: [PATCH] Support underline colors and styles in te


From: Eli Zaretskii
Subject: bug#45230: /bug#45231: [PATCH] Support underline colors and styles in terminal
Date: Sat, 24 Dec 2022 09:47:52 +0200

> From: Adam Schwalm <adamschwalm@gmail.com>
> Date: Thu, 22 Dec 2022 19:36:35 -0600
> 
> Many modern terminal emulators support control sequences that enable 
> underlines
> with colors other than the text foreground color and styles like the
> 'wave' used in GUI
> mode Emacs. These two patches add support for using these control sequences
> in terminal mode Emacs. The first enables support for terminals which
> report support
> for these features in their terminfo, the second adds two functions
> which can be used
> to override terminfo and explicitly enable the feature. The latter is
> unfortunately probably
> necessary, as there is no official way to announce support in terminfo
> yet (though there
> is an unofficial standard being followed by some terminals).
> 
> I have tested these patches on the following terminal emulators on GNU/Linux:
> 
> - Alacritty
> - Kitty
> - Wezterm
> - gnome-terminal (vte)
> 
> And on Windows, I tested with mintty (though I have very little
> experience with Windows
> terminal emulators).

I didn't see in the patches any code that would enable this feature in
the MS-Windows build of Emacs; did I miss something?

> For alacritty, kitty and wezterm, the 'style' feature works without
> any action from the user.
> The 'Smulx' entry is present in their terminfo, which emacs detects.
> Unfortunately, while
> some terminals like wezterm do announce support for underline colors
> via 'Setulc',
> they do not announce support for the 'ol' feature used to reset the
> underline color back
> to default (which I think is necessary when turning off a face).
> Therefore, I had to use
> the new functions to force enable colors. After doing this, underline
> colors worked in
> the terminals listed above.
> 
> I will be working in the next few weeks to update the terminfo for
> some of these terminal
> emulators to reflect these capabilities, but this will presumably take
> a long time to
> actually land in the main ncurses terminfo.src. With that said, I do
> think there is enough
> of a general consensus on the terminfo names that should be used (from tmux 
> and
> existing usage in some terminals), that such additions will hopefully
> be uncontroversial.

If terminfo doesn't define these capabilities, how will we make sure
the terminal actually supports them?  Should we perhaps test the name
of the terminal?  I don't think I like just trusting the users on doing
TRT when they enable the feature by hand.

> Please note that I have not signed the copyright assignment, but if
> these patches seem worth
> merging in some form, I will complete that (and update
> NEWS/manuals/etc). There are
> some areas that I suspect I am doing things wrong as I don't have much prior
> experience with emacs internals, so please let me know and I'll update things.

Thanks, these are definitely features we'd like to have, so please do
start you legal paperwork rolling (I can send you the form if you
want/need that), so that we could accept the changes.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]