all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: yuri.v.khan@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: What's happened to M-<tab> `completion-at-point'?
Date: Thu, 05 May 2022 20:28:53 +0300	[thread overview]
Message-ID: <831qx73n3e.fsf@gnu.org> (raw)
In-Reply-To: <YnQCEz31lk7Uc0xG@ACM> (message from Alan Mackenzie on Thu, 5 May 2022 16:57:55 +0000)

> 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	other threads:[~2022-05-05 17:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 21:06 What's happened to M-<tab> `completion-at-point'? Alan Mackenzie
2022-05-04  6:32 ` Eli Zaretskii
2022-05-04 16:34   ` Alan Mackenzie
2022-05-04 16:40     ` Eli Zaretskii
2022-05-04 18:13       ` Alan Mackenzie
2022-05-04 18:55         ` Eli Zaretskii
2022-05-04 19:10           ` Alan Mackenzie
2022-05-04 19:47             ` Yuri Khan
2022-05-04 20:16               ` Stefan Monnier
2022-05-04 20:31                 ` Yuri Khan
2022-05-04 20:50                   ` Stefan Monnier
2022-05-04 21:07                   ` Alan Mackenzie
2022-05-05  5:03                     ` tomas
2022-05-05  6:20                     ` Eli Zaretskii
2022-05-05 16:57                       ` Alan Mackenzie
2022-05-05 17:28                         ` Eli Zaretskii [this message]
2022-05-06 23:19                           ` Richard Stallman
2022-05-07 11:03                             ` Alan Mackenzie
2022-05-08 23:35                               ` Richard Stallman
2022-05-04 20:35               ` Alan Mackenzie
2022-05-04 19:16           ` Tassilo Horn
2022-05-04 19:39             ` Eli Zaretskii
2022-05-04 19:45               ` Tassilo Horn
2022-05-04 19:57               ` Andreas Schwab
2022-05-04  6:33 ` Lars Ingebrigtsen
2022-05-04 16:26   ` Alan Mackenzie

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831qx73n3e.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yuri.v.khan@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.