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: Thu, 5 May 2022 16:57:55 +0000

Hello, Eli.

On Thu, May 05, 2022 at 09:20:17 +0300, Eli Zaretskii wrote:
> > Date: Wed, 4 May 2022 21:07:04 +0000
> > Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Eli Zaretskii <eliz@gnu.org>,
> >   Emacs developers <emacs-devel@gnu.org>
> > From: Alan Mackenzie <acm@muc.de>

> > Maybe the best thing we can do in Emacs is to remove that entry for "kB"
> > in src/term.c.  That would prevent Emacs recognising <shift>TAB on all
> > these misconfigured keyboards.  I think that is a lesser evil than
> > failing to recognise <meta>TAB.

> This doesn't sound like a good idea to me.  Emacs shouldn't try
> second-guessing the user's keyboard configuration, it isn't in our
> mandate.

We have a bug here, Emacs does not work properly.  While it is true in
theory that a user might be able to fix it in her configuration, in
practice this is just too difficult for a user to diagnose and fix.
Note that all the key sequences M-tab, ESC TAB, and C-M-i are affected.

The change from ncurses-6.2 to ncurses-6.3 broke the Linux console
keyboard, in that terminfo now directs ESC TAB to be translated to
backtab.  This was almost certainly intentional, possibly prompted by
the misconfiguration of so many Linux keyboard layouts (in
/usr/share/keymaps/...), where the <shift>TAB key sequence produces the
characters ESC TAB.  I can imagine that there was a lot of strenuous
discussion on the ncurses mailing list before making this change, and
that it was done with regret.

> If the terminfo database you have doesn't do what you want, why can't
> you modify it?  The tools to do that are available, and aren't part of
> Emacs.

I could do this without too much difficulty for myself personally, but
that doesn't fix the bug for other users.  I don't think we want to
distribute a version of terminfo just for Linux Emacs users.

> (We could include the instructions for making such a change in
> PROBLEMS, if this is a common issue.)  Of course, the best solution
> would be if the distro changes the terminfo database.

There are many GNU/Linux distros all distributing Emacs, and I think it
likely that few, if any, will be prepared to fix terminfo (likely
"breaking" other programs) for the sake of Emacs.

Our problem here is caused by an ad hoc change to terminfo.  Why can't
we fix it likewise by an ad hoc change in Emacs, that would prevent ESC
TAB only on the Linux keyboard from being changed into backtab.  We
could make this optional, either by a run-time or a configure-time
option.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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