GNU bug report logs - #51297
28.0.60; [PATCH] Update termcap/terminfo to indicate 16-color support

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Tue, 19 Oct 2021 23:50:02 UTC

Severity: normal

Tags: moreinfo, patch

Found in version 28.0.60

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

Bug is archived. No further changes may be made.

Full log


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

From: <miha <at> kamnitnik.top>
To: Jim Porter <jporterbugs <at> gmail.com>, 51297 <at> debbugs.gnu.org
Subject: Re: bug#51297: 28.0.60; [PATCH] Update termcap/terminfo to indicate
 16-color support
Date: Wed, 20 Oct 2021 23:06:39 +0200
[Message part 1 (text/plain, inline)]
Jim Porter <jporterbugs <at> gmail.com> writes:

> On 10/20/2021 1:29 AM, miha--- via Bug reports for GNU Emacs, 
> the Swiss 
> army knife of text editors wrote:
>> In conclusion, I think we should update the terminfo, changing 
>> colors, setab and setaf, and leave term.el unchanged.  Patch 
>> attached.
>
> Thanks, this seems reasonable to me. I don't know much about the 
> details  of terminfo, so I wasn't aware of setab/setaf.
>
> More generally, I do wonder if we should be concerned with 
> making it  possible to distinguish between different versions of 
> Emacs, since 27,  28, and 29 all have different capabilities. At 
> least as I understand it,  If I SSH into a system, having 
> `TERM=eterm-color' isn't enough to know  whether 8, 16, or 256 
> colors are supported.

Yeah, that's a somewhat complicated problem.  I thought about the 
option of having something like 'TERM=eterm-16color' on Emacs-28 
in order to make Emacs-28 and Emacs-27 term.el distinguishable. 
The major downside of this option is that many terminal programs 
simply refuse to start if eterm-16color is not registered in the 
terminfo database (try running
'env TERM=eterm-16color top').  ssh-ing from term.el onto a system 
that rarely updates its terminfo database wouldn't be pleasant at 
all.

That's why I think its best to keep using 'TERM=eterm-color' and 
simply update the terminfo file.  Since all our updates to this 
file are backwards-compatible, there shouldn't be any major 
problems even if the terminfo database on the ssh host isn't up to 
date.  A problem does arise in the opposite case when the terminfo 
database on the host is up to date but the ssh client is term.el 
from Emacs version 27 or older.  TUI programs will think they can 
output sequences that the older term.el doesn't understand, but I 
think that term.el handles unknown sequences quite gracefully by 
simply ignoring them.

After Emacs-28 is released, we should probably talk to the ncurses 
maintainer about updating the eterm-color terminfo file 
distributed with the ncurses package.  From my understanding, the 
option I described in the previous paragraph is also the proffered 
way to update terminfo files in the ncurses package.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 257 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.