[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: terminfo change for screen/eterm?
From: |
Thomas Dickey |
Subject: |
Re: terminfo change for screen/eterm? |
Date: |
Mon, 2 Jan 2023 05:58:26 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Mon, Jan 02, 2023 at 05:15:42AM +0000, Sam James wrote:
> Hi,
>
> In Gentoo, https://bugs.gentoo.org/698318 was reported to us where
> a patch (https://698318.bugs.gentoo.org/attachment.cgi?id=593684).
> was given to avoid Emacs malfunctioning within screen.
>
> It seems Debian's been applying this for a while (and still is).
>
> Is it appropriate for ncurses to include?
maybe/maybe not - thinking of screen:
This may be like xterm, whose kbs is ^? with Linux/etc, but ^H everywhere else.
Studying screen (upstream and Debian packages), I don't see many clues.
The Debian changelog has a note
screen (3.7.4-4) unstable; urgency=low
* Changed upstream changelog name (ChangeLog.gz -> changelog.gz)
* Changed sockets from /tmp to /var/run (closes:Bug#6487)
* New Standards-Version: 2.3.0.1
* Changed behaviour of backspace key (now sends `DEL' == 0177)
-- Juan Cespedes <cespedes@debian.org> Sun, 4 Jan 1998 21:13:51 +0100
but aside from some hard-coded '\177' usage in the screen source (both for
input and output), I don't see much relevant. (screen's source history does
not go back that far - there are a few snapshots dumped into it without any
ordering, so it's far from clear).
I do see this (from 2002):
/* Some xterm entries set kD to ^?. Nuke it. */
if (D_tcs[T_NAVIGATE_DELETE].str && !strcmp(D_tcs[T_NAVIGATE_DELETE].st>
D_tcs[T_NAVIGATE_DELETE].str = NULL;
/* wyse52 entries have kcub1 == kb == ^H. Nuke... */
if (D_tcs[T_CURSOR + 3].str && !strcmp(D_tcs[T_CURSOR + 3].str, "\008"))
D_tcs[T_CURSOR + 3].str = NULL;
The terminfo bundled with screen doesn't have kbs, nor the termcap kb. So I'm
guessing that aspect of the terminal description was never a big issue to the
screen developers. It's not configurable, for instance. Whether it is
actually system-dependent needs some investigation.
From what I can see in a quick check (looking at FreeBSD), a "backspace" key
ends up using whatever the underlying terminal does.
fwiw, in ncurses, that kbs=^H came in 1995. Changing it to use=xterm+kbs
would improve some cases, while others (matching hard-coded behavior in
the underlying terminal) would have to be repaired.
I see 25 entries to investigate :-)
The patch is for "Eterm" (originally an rxvt fork), not "eterm" (Emacs).
Again, that might be system-dependent -- but using xterm+kbs in that
case would be wrong :-)
> The Debian bugs in the patch are:
> - https://bugs.debian.org/237997
> - https://bugs.debian.org/602300
>
> (CC'd the Debian patch authors.)
>
> Thanks,
> sam
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature