From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51297: 28.0.60; [PATCH] Update termcap/terminfo to indicate 16-color support Date: Wed, 20 Oct 2021 23:06:39 +0200 Message-ID: <87v91rcso0.fsf@miha-pc> References: <5317d810-ac3c-23e3-e017-a057406ec6b8@gmail.com> <87y26om74o.fsf@miha-pc> <5faa033c-c708-6f49-d09c-a4845e872b92@gmail.com> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2491"; mail-complaints-to="usenet@ciao.gmane.io" To: Jim Porter , 51297@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 20 23:04:45 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdIlQ-0000Qe-Ac for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Oct 2021 23:04:45 +0200 Original-Received: from localhost ([::1]:39610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdIlO-0005lo-LW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Oct 2021 17:04:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdIjo-0004GP-8O for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2021 17:03:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdIjn-0005Bk-UK for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2021 17:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdIjn-00016l-QO for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2021 17:03:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Oct 2021 21:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51297 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51297-submit@debbugs.gnu.org id=B51297.16347637824238 (code B ref 51297); Wed, 20 Oct 2021 21:03:03 +0000 Original-Received: (at 51297) by debbugs.gnu.org; 20 Oct 2021 21:03:02 +0000 Original-Received: from localhost ([127.0.0.1]:55610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdIjm-000166-9L for submit@debbugs.gnu.org; Wed, 20 Oct 2021 17:03:02 -0400 Original-Received: from kamnitnik.top ([209.250.245.214]:41474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdIjb-00015S-RR for 51297@debbugs.gnu.org; Wed, 20 Oct 2021 17:02:52 -0400 Original-Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43]) by kamnitnik.top (Postfix) with ESMTPSA id E5EC49CFAC; Wed, 20 Oct 2021 21:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1634763769; bh=MYLLqwzxp4gk1wwSGyBr9qi59g2kOznOh0cdU/A4I6U=; h=From:To:Subject:In-Reply-To:References:Date:From; b=ESxr/LEUUZS/Auxs78aACvfXJhojIReU8mj+CtN6LocYaryeSz+MSMM2mxutIPLTm d4BQDbACfWizqtq1ELMAovZHLQV6FD0Zce1j03EJJqb6sODZkDHlZT7uqKBc3RGJya 28F6Soc5rwY4lbYiLetLCwziDt48Lp/1WrKDn7FU6oF8IPggAqd3aTzpD5HvO9Cq7l cOgU9O5tkMzAPz+oiJPvBXJWh1Lcl/d+otletYfZGMoE1IbCtL89/jMgV7PQbnYHhf IY+YgKthj9T+mkwTG301mM7ajarAhKf1kPLqGeCfYa3F7GjnMB5q3hqEi1jSQykWL2 ICfYvwWVnpQKg== In-Reply-To: <5faa033c-c708-6f49-d09c-a4845e872b92@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217722 Archived-At: --=-=-= Content-Type: text/plain; format=flowed Jim Porter 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmFwhN8THG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP0O7D/9dBKjvpUqIbeYinopvBuaKtuq/gtmV 7Ybs1NnKg5uaLOLMMXXjLUGU2sKWurfIh44pdLaPsn0jAZt7QPKS8Is7X1RNEmTk DXCK2bTomYaJXMOCPVYLn19mm9id4d77/S5+fcATV+0OmW7y+9kdbHZhiV7abKP+ 2WrZBXSwDRV2d2D5YVqUO9PufJgC95YeNxaknfOgpdPGtUfibc0LMRZjqUS3nxUJ K35MPL5Mk/Mn5a8i3rrmgAs3Mc92lXu+BmrspQT9wIAGtoGzsDp9yBGL+E16wOLf 6dk/sLJrYRq1Nddp+boC43JxFVWlyZkBLvH6TX9tBiZLO06pbIuTi4ksgDhFWKKC qVsL0WIpNhqhu0caS02Li7EKo7Xl+Wg/PvywsgbYVRjWZQ1zvlt+9BtYvDwG9zDu xd0MkgkfR33QIRjJe1CWxMcE4m/41OKEgvIC4i5adC4NhZOekRcnRMxsnwZI9Yie 2/xCUa/9YwmBq0B3FEq4iNd7FxYFKYJAX9wquL4rpIdBa2ccDVquoGlW2s/HInie raH7XjfW1vT8by0XK0CBckIfFL4YhmmxUnaIqQqUBtK1xfwRN7t/MVVGk9REcFYO 6P2BnhToUwem+nNA/5GyjSyopu37YJv4yP+3nFJN3RiA4AMUF+bdOvnxYrhpuMb8 0iy9ndYpK6OeVw== =fxq1 -----END PGP SIGNATURE----- --=-=-=--