unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>, 51297@debbugs.gnu.org
Subject: bug#51297: 28.0.60; [PATCH] Update termcap/terminfo to indicate 16-color support
Date: Wed, 20 Oct 2021 23:06:39 +0200	[thread overview]
Message-ID: <87v91rcso0.fsf@miha-pc> (raw)
In-Reply-To: <5faa033c-c708-6f49-d09c-a4845e872b92@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]

Jim Porter <jporterbugs@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2021-10-20 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 23:49 bug#51297: 28.0.60; [PATCH] Update termcap/terminfo to indicate 16-color support Jim Porter
2021-10-20  8:29 ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-20 19:50   ` Jim Porter
2021-10-20 21:06     ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-10-30 15:53       ` Stefan Kangas
2021-11-04 23:20   ` Lars Ingebrigtsen
2021-11-04 23:47     ` Jim Porter
2021-11-05  2:27       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v91rcso0.fsf@miha-pc \
    --to=bug-gnu-emacs@gnu.org \
    --cc=51297@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=miha@kamnitnik.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).