emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs difficulties in linux console with ncurses-6.3 caused by kcbt=


From: Alan Mackenzie
Subject: Re: Emacs difficulties in linux console with ncurses-6.3 caused by kcbt=\E^I.
Date: Sat, 7 May 2022 10:41:46 +0000

Hello, Eli.

On Fri, May 06, 2022 at 22:14:04 +0300, Eli Zaretskii wrote:
> > Date: Fri, 6 May 2022 18:49:39 +0000
> > Cc: bug-ncurses@gnu.org, emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>

> > > > 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.

> > Sorry, I mistyped there.  I meant to write "withOUT using ugly ... code".
> > Eli Zaretskii, the maintainer of Emacs, is against putting in special
> > handling for the linux console's kcbt.

> I'm not against that, I'm against doing that in term.c for all the
> text-mode terminals.

I misunderstood you, there, sorry.  I'd misunderstood the code, and I
thought (without thinking) that the translation functionality for
terminfo settings would be buried deep in the C code, somewhere.

> You could, for example, modify input-decode-map in lisp/term/linux.el,
> and that would be OK with me, if there's no better solution for this.

That's the bit I missed - that the pertinent translation into 'backtab
is done by the input-decode-map.  So, as you say, all that is needed is
to remove the <esc><tab> binding from that keymap.  I'll take back what
I said about the problem being difficult to fix.

Maybe we can write an entry in PROBLEMS and leave it to the user to fix
in her .emacs.  Or maybe we can put code in lisp/term/linux.el
ourselves.

> Doing that will cause users of Emacs on the Linux console to lose
> Backtab and gain M-TAB instead.  Personally, I'm not sure which one is
> more important, but then I don't use the Linux console.

I don't know how typical I am of Linux console users, but I have my
keymap set up to send a different code for <shift><tab> - namely
"\033[4}\011".  This is according to a scheme developed by Kalle
Niemitalo over twenty years ago, which enables one to add bindings for
any key with any modifier combination.  There are matching bindings in
input-decode-map to interpret these prefixes.

What was so painful was that typing <esc> and <tab> separately failed to
combine into M-tab, and I couldn't see a way of getting around that.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]