Subject: bug#65029: Italics bug when Emacs runs inside GNU Screen

From: Eli Zaretskii <[email-masked]>
Date: Sat, 12 Aug 2023 09:45:39 +0300

Ping!  Can we please make some progress with this issue?

> Cc: [email-masked]
> Date: Thu, 03 Aug 2023 09:46:13 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > Date: Wed, 02 Aug 2023 23:37:54 +0000
> > From:  James Ipswich via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <[email-masked]>
> > 
> > GNU Screen added italics support on its master branch a while ago
> > [1]. If I run Emacs (29.1) inside GNU Screen (master), there are strange
> > font issues.
> > 
> > All text that should be italicized, e.g. /text/ in org-mode or
> > annotations provided by marginalia-mode, is underlined. Oddly, text that
> > should not be italicized, e.g. the menu bar and the status bar, is in
> > fact italicized. I am running xterm (383) with DejaVu fonts. Text
> > displayed inside GNU Screen but outside Emacs is properly italicized.
> > 
> > If I replace xterm with urxvt or kitty, the issue persists. If I replace
> > DejaVu with other fonts, the issue also persists. If I replace GNU
> > Screen with Tmux, all italics are displayed correctly.
> > 
> > [1] https://savannah.gnu.org/bugs/?func=detailitem&item_id=36676
> 
> I guess Screen changes the terminfo entry of the terminal in some way?
> Please step with GDB through init_tty and see what we get when we
> query terminfo about the italics:
> 
>   tty->TS_enter_italic_mode = tgetstr ("ZH", address);
> 
> Please do this inside and outside of Screen, with the same terminal
> emulator, and post the results.
> 
> Thanks.
> 
> 
> 
>