From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Dickey Newsgroups: gmane.comp.lib.ncurses.bugs,gmane.emacs.devel Subject: Re: Emacs difficulties in linux console with ncurses-6.3 caused by kcbt=\E^I. Date: Thu, 5 May 2022 20:01:02 -0400 Message-ID: <20220506000102.GA10144@prl-debianold-64.jexium-island.net> References: Reply-To: dickey@his.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35080"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: bug-ncurses@gnu.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: bug-ncurses-bounces+gnu-bug-ncurses=m.gmane-mx.org@gnu.org Fri May 06 02:01:20 2022 Return-path: Envelope-to: gnu-bug-ncurses@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 1nmlPK-0008t8-QV for gnu-bug-ncurses@m.gmane-mx.org; Fri, 06 May 2022 02:01:18 +0200 Original-Received: from localhost ([::1]:44928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmlPJ-0002Bk-D5 for gnu-bug-ncurses@m.gmane-mx.org; Thu, 05 May 2022 20:01:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmlPC-0002BR-8u for bug-ncurses@gnu.org; Thu, 05 May 2022 20:01:11 -0400 Original-Received: from smtp-1a.his.com ([216.194.196.25]:42716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmlPA-0004qA-CY for bug-ncurses@gnu.org; Thu, 05 May 2022 20:01:09 -0400 Original-Received: from cuda201.his.com (cuda201.his.com [216.194.196.22]) by smtp-1a.his.com (Postfix) with ESMTPS id C88C159B for ; Thu, 5 May 2022 20:01:06 -0400 (EDT) X-ASG-Debug-ID: 1651795262-061c41240d2b6f30001-IDp6Hi Original-Received: from smtp-nf-202.his.com (smtp-nf-202.his.com [216.194.196.20]) by cuda201.his.com with ESMTP id 4gwEYPpezlsgdqL3; Thu, 05 May 2022 20:01:02 -0400 (EDT) X-Barracuda-Envelope-From: tom@invisible-island.net X-Barracuda-RBL-Trusted-Forwarder: 216.194.196.20 Original-Received: from zproxy101.his.com (zproxy101.his.com [18.218.2.49]) by smtp-nf-202.his.com (Postfix) with ESMTPS id BB89E609B5; Thu, 5 May 2022 20:01:02 -0400 (EDT) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id 8FA4217A522; Thu, 5 May 2022 20:01:02 -0400 (EDT) X-Barracuda-RBL-IP: 18.218.2.49 X-Barracuda-Effective-Source-IP: zproxy101.his.com[18.218.2.49] X-Barracuda-Apparent-Source-IP: 18.218.2.49 Original-Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oDsPxTT-20Zi; Thu, 5 May 2022 20:01:02 -0400 (EDT) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id 7491817A523; Thu, 5 May 2022 20:01:02 -0400 (EDT) X-Virus-Scanned: amavisd-new at zproxy101.his.com Original-Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ybfLvTIAtPhL; Thu, 5 May 2022 20:01:02 -0400 (EDT) Original-Received: from prl-debianold-64.jexium-island.net (static-71-246-219-82.washdc.fios.verizon.net [71.246.219.82]) by zproxy101.his.com (Postfix) with ESMTPSA id 5754B17A522; Thu, 5 May 2022 20:01:02 -0400 (EDT) Original-Received: from tom by prl-debianold-64.jexium-island.net with local (Exim 4.92) (envelope-from ) id 1nmlP4-0002it-1y; Thu, 05 May 2022 20:01:02 -0400 X-ASG-Orig-Subj: Re: Emacs difficulties in linux console with ncurses-6.3 caused by kcbt=\E^I. Content-Disposition: inline In-Reply-To: X-Barracuda-Connect: smtp-nf-202.his.com[216.194.196.20] X-Barracuda-Start-Time: 1651795262 X-Barracuda-URL: https://spam.his.com:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at his.com X-Barracuda-Scan-Msg-Size: 4119 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=6.0 tests=BSF_SC0_SA085b, PR0N_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.97815 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.20 PR0N_SUBJECT Subject has letters around special characters (pr0n) 0.40 BSF_SC0_SA085b Custom Rule SA085b Received-SPF: pass client-ip=216.194.196.25; envelope-from=btv1==12545bf5520==tom@invisible-island.net; helo=smtp-1a.his.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: bug-ncurses@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Bug reports for ncurses, the GNU implementation of curses" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-ncurses-bounces+gnu-bug-ncurses=m.gmane-mx.org@gnu.org Original-Sender: "Bug-ncurses" Xref: news.gmane.io gmane.comp.lib.ncurses.bugs:8541 gmane.emacs.devel:289288 Archived-At: --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 05, 2022 at 06:18:00PM +0000, Alan Mackenzie wrote: > Hello, ncurses! >=20 > I'm writing as a member of the Emacs development team. >=20 > In the recent change from ncurses-6.2 to ncurses-6.3, the following > change was make in the linux console terminfo: >=20 > --- Infocmp-linux-6.2 2022-05-04 20:16:01.609557894 +0000 > +++ infocmp-linux-6.3 2022-05-04 20:09:02.046581014 +0000 > @@ -14,7 +14,7 @@ > home=3D\E[H, hpa=3D\E[%i%p1%dG, ht=3D^I, hts=3D\EH, ich=3D\E[%p1%= d@, > ich1=3D\E[@, il=3D\E[%p1%dL, il1=3D\E[L, ind=3D\n, > initc=3D\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x= %p4%{255}%*%{1000}%/%02x, > - kb2=3D\E[G, kbs=3D^?, kcbt=3D\E[Z, kcub1=3D\E[D, kcud1=3D\E[B, > + kb2=3D\E[G, kbs=3D^?, kcbt=3D\E^I, kcub1=3D\E[D, kcud1=3D\E[B, > kcuf1=3D\E[C, kcuu1=3D\E[A, kdch1=3D\E[3~, kend=3D\E[4~, kf1=3D\E= [[A, > kf10=3D\E[21~, kf11=3D\E[23~, kf12=3D\E[24~, kf13=3D\E[25~, > kf14=3D\E[26~, kf15=3D\E[28~, kf16=3D\E[29~, kf17=3D\E[31~, >=20 > We now have kcbt=3D\E^I. A bug report got me to verify this, and shift-tab on the console appeared to send that sequence, so I documented it in the terminal description. Tracing changes to default keyboard configuration in Linux isn't as "simple" as control-sequences, but see below (it's "kbd"). I don't see any that send \E[Z. Having the terminal description list a key definition that no one uses isn't very useful. (I'll allow for some keyboard differences -- who has a "clear" key? -- but shift-tab has been used for a long time). Just to check: Debian, Fedora, Mageia, OpenSUSE do this (send \E^I) Arch, Slackware don't do this (I get just ^I) I have a few others that I could check, but (CentOS and Scientific Linux) those are either obsolete or derived from the ones that I listed. I'm aware that there are (down in the 1% range) still other Linux-based systems, but generally speaking few/none of those have contributed in this area, so I don't have a machine to verify bug reports. fwiw, I noticed some comment in the usual source of misinformation recently stating that \E[Z originated with Linux in 1995. That was incorrect (the terminal database shows this for several AT&T entries and an Ann Arbor Ambassador entry - roughly ten years earlier). =20 > In Emacs on the Linux console, our use of terminfo now has the effect of > replacing the M-tab keysequence with backtab. This make several > important key-bindings unusable. (The backtab binding is also used, but > is perhaps a little less important.) Perhaps that original kcbt was changed to allow the \E^I to work with Emacs. If that's the case, then it should be something that I can document in the terminal description. All that I have so far is the commit message, which gives no useful information regarding the intent of the change: commit 0baa7f071e79bb700b62b1f8507630387cbc4bbb Author: Alexey Gladkov Date: Tue May 8 22:55:07 2007 +0400 Apply patchkbd-1.12-Meta-Tab.diff from SUSE =20 Convert Shift Tab to Meta_Tab =20 Signed-off-by: Alexey Gladkov and this equally non-informative mailing list thread: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org/message/= P3DQHCZB7IWQ7F6VZD3LGXHVOIN6OFE6/ (which for example doesn't mention Emacs). > Also, this would seem to be a difficult problem for a normal user to > diagnose, and difficult also to fix. >=20 > May I ask why this change was made to the linux terminal? Is there any > possibiliy it might be reverted? It was a bug report: # 2021-09-04 # + modify linux3.0 entry to reflect default mapping of shift-tab by # kbd 1.14 (report by Jan Engelhardt) -TD =20 > Is there perhaps some strategy we could use in Emacs (C code) which would > work around this problem with using ugly ad-hoc code? I suppose you could tell Emacs to ignore kcbt (termcap kB) for Linux. non-Emacs users probably would like to use the key. --=20 Thomas E. Dickey https://invisible-island.net ftp://ftp.invisible-island.net --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmJ0ZToACgkQzCr0RyFn vgPFKwwAlh4O5S8iN7G799LWaK+NFjUe5tWWNPciY8TpRgMQ9jFOytpeUp5Vl81F SBE22AcaB5YWHGApsUx8M0VRiTClmelEoW0YkNaOEMJIyJB4qr4Ot2HrsumldMYY KlXc5ADDPSFajuNBb2WklaYtiDlmvNTXklfabKSwW4yTf5O01TIaKlerDdWmJkKe yv4J4U7Pr/Wr/OU8Qegl79wRm4Mri+VWiV+UubSky0gFqPM8mB0GOrwcRXkVyzeN wwoJIF9zRDAIoU/BxwTjUTjCaJjUbPkpYKvLziNGFQJSNEyUr8QS1YmbWFNr03la xV1WZEp9YQkaCZzcBQVFXCr8KoMvrJMRi8FMz+jjtesEC1u4G/P9HvT2zpjZ4uTy BCAtdcKWLLkegT0ywHGLTlPGfJg6sFpjmZvyGN9h9QCbP+1E6TYGSbCDjmTR6Bs2 0FnVavxtB7TMJIwMN/NNMespKXeuyhMFQ9j7VHwN+bq2VRRgAK88yv+pJgCmf6wW i+szXOxI =W9Bm -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--