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: Eli Zaretskii
Subject: Re: What's happened to M-<tab> `completion-at-point'?
Date: Thu, 05 May 2022 20:28:53 +0300

> Date: Thu, 5 May 2022 16:57:55 +0000
> Cc: yuri.v.khan@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> > > 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.

That's your opinion.  It might also be the opinion of some others.
But the (mis)behavior is not due to Emacs code, it is due to ncurses
and the terminfo database that comes with it.  Why should we fix in
Emacs something that should be fixed outside of it, if at all, and
with such drastic measures on top of that?  Entirely ignoring a
terminfo capability is a drastic measure, which will affect not just
this particular aspect of the Emacs behavior.

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

I don't see the difficulty.  Moreover, I don't even see the need to
fix it for every user out there.  We don't even know _why_ did ncurses
make this change.  Nor do I expect many Emacs users to use it on the
Linux console in the first place.  Your proposed "solution", OTOH,
affects _all_ users of TTY frames in Emacs, regardless of whether they
are or aren't affected by the M-TAB behavior of the Linux console.

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

Why do we need to "imagine"? why not find those discussions and read
them, and/or ask the ncurses developers to reconsider and/or explain
to us why this change is TRT from their POV?

Armed with their opinions and rationale, we could then revisit this
issue and make up our own minds about the best course of action.

But making such serious changes with such wide consequences is not
something I'm interested in or agree to without a very good
understanding of the reasons why ncurses made the change.  Sorry, not
on my watch.

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

As long as this is a problem for only a few users, we can tell in
PROBLEMS how to make the change.  It isn't too complicated.

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

Each user can make up his/her own mind whether they want to make the
change and whether it will break anything for them.  We don't need
(and should not) second-guess their needs.

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

Because it isn't our problem to begin with, and we don't even
understand its nature well enough to make a good decision.  If you
want to facilitate the decision-making process, please find the
discussions that led to this change in ncurses and/or talk to the
ncurses developers about the issue and find out what is their take on
it.



reply via email to

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