unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Thomas Dickey <dickey@his.com>
Cc: bug-ncurses@gnu.org, emacs-devel@gnu.org
Subject: Re: Emacs difficulties in linux console with ncurses-6.3 caused by kcbt=\E^I.
Date: Sun, 8 May 2022 12:09:53 +0000	[thread overview]
Message-ID: <YnezEbviPtjlngv5@ACM> (raw)
In-Reply-To: <20220506000102.GA10144@prl-debianold-64.jexium-island.net>

Hello again, Thomas.

On Thu, May 05, 2022 at 20:01:02 -0400, Thomas Dickey wrote:
> On Thu, May 05, 2022 at 06:18:00PM +0000, Alan Mackenzie wrote:
> > Hello, ncurses!

> > I'm writing as a member of the Emacs development team.

> > In the recent change from ncurses-6.2 to ncurses-6.3, the following
> > change was make in the linux console terminfo:

> > --- 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=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
> >         ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n,
> >         initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x,
> > -       kb2=\E[G, kbs=^?, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
> > +       kb2=\E[G, kbs=^?, kcbt=\E^I, kcub1=\E[D, kcud1=\E[B,
> >         kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
> >         kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
> >         kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,

> > We now have kcbt=\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.

Just to say that fixing Emacs to work with kcbt=\E^I wasn't actually very
difficult at all, and I've committed a patch to the Emacs repository with
this fix.

I think it's a shame that there has been this confusion between
<shift>TAB and <alt>TAB over the decades.  This has made things difficult
for applications like Emacs, which use both of these.

So my position now is that I no longer have a view on what the best
setting for kcbt in the linux console terminfo entry is.

[ .... ]

> I suppose you could tell Emacs to ignore kcbt (termcap kB) for Linux.

This is in effect what has been done.

> non-Emacs users probably would like to use the key.

Yes.  ;-(

Thank you very much for your time, and the additional background
information, over the last few days.

> -- 
> Thomas E. Dickey <dickey@invisible-island.net>
> https://invisible-island.net
> ftp://ftp.invisible-island.net

-- 
Alan Mackenzie (Nuremberg, Germany).



  parent reply	other threads:[~2022-05-08 12:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 18:18 Emacs difficulties in linux console with ncurses-6.3 caused by kcbt=\E^I Alan Mackenzie
2022-05-06  0:01 ` Thomas Dickey
2022-05-06 11:26   ` Stefan Monnier
2022-05-06 18:49   ` Alan Mackenzie
2022-05-06 19:14     ` Eli Zaretskii
2022-05-07 10:41       ` Alan Mackenzie
2022-05-07 10:45         ` Eli Zaretskii
2022-05-07 14:35           ` Alan Mackenzie
2022-05-07 15:03             ` Eli Zaretskii
2022-05-07 17:37               ` Alan Mackenzie
2022-05-07 17:55                 ` Eli Zaretskii
2022-05-08 23:37     ` Richard Stallman
2022-05-08 12:09   ` Alan Mackenzie [this message]
2022-05-08 16:05     ` Thomas Dickey

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=YnezEbviPtjlngv5@ACM \
    --to=acm@muc.de \
    --cc=bug-ncurses@gnu.org \
    --cc=dickey@his.com \
    --cc=emacs-devel@gnu.org \
    /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).