emacs-devel
[Top][All Lists]
Advanced

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

Re: What's happened to M-<tab> `completion-at-point'?


From: Alan Mackenzie
Subject: Re: What's happened to M-<tab> `completion-at-point'?
Date: Wed, 4 May 2022 20:35:02 +0000

Hello, Yuri.

On Thu, May 05, 2022 at 02:47:41 +0700, Yuri Khan wrote:
> On Thu, 5 May 2022 at 02:10, Alan Mackenzie <acm@muc.de> wrote:

> > I don't understand it either, yet.  To be sure that terminfo is the
> > problem, I'll have to do something like reinstalling the old version of
> > ncurses, and seeing the problem is no longer there.

> > But in src/term.c L1258 appears:

> >       {"kB", "backtab"},    /* terminfo */

> > The "kB" is a terminfo code for back-tab, and the "backtab" might
> > somehow be the source for the "[backtab] is undefined" error message.

> You might be on to something.

>     $ infocmp linux
>     #       Reconstructed via infocmp from file: /lib/terminfo/l/linux
>     linux|Linux console,
>             am, bce, ccc, eo, mir, msgr, xenl, xon,
>
>             kb2=\E[G, kbs=^?, kcbt=\E^I, kcub1=\E[D, kcud1=\E[B,
>

Thanks for the tip!  I didn't know about infocmp.

> In other words, the terminfo database declares a capability named
> ‘kcbt’ with the value ESC TAB. And ‘man terminfo’ says ‘kcbt’ is the
> backtab key.

I ran $ infocmp linux on the ncurses 6.3, then reinstalled 6.2 and did
it again.  A diff shows this:

--- /home/acm/infocmp-linux-6.2 2022-05-04 20:16:01.609557894 +0000
+++ /home/acm/infocmp-linux-6.3 2022-05-04 20:09:02.046581014 +0000
@@ -1,5 +1,5 @@
 #      Reconstructed via infocmp from file: /etc/terminfo/l/linux
-linux|linux console,
+linux|Linux console,
        am, bce, ccc, eo, mir, msgr, xenl, xon,
        colors#8, it#8, ncv#18, pairs#64,
        acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
@@ -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~,

..  So the one substantial change has been changing from kcbt=\E[Z to
kcbt=\E^I.  6.3 is instructing Emacs to interpret 0x19 0x09 as
back-tab, whereas before it was interpreted simply as ESC TAB.

This looks like it might be a bug in ncurses-6.3.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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