From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: What's happened to M- `completion-at-point'? Date: Thu, 05 May 2022 20:28:53 +0300 Message-ID: <831qx73n3e.fsf@gnu.org> References: <83sfpp2qvy.fsf@gnu.org> <83r1592km7.fsf@gnu.org> <83fslo33ha.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25473"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yuri.v.khan@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 05 19:58:55 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmfkd-0006Pc-3H for ged-emacs-devel@m.gmane-mx.org; Thu, 05 May 2022 19:58:55 +0200 Original-Received: from localhost ([::1]:54612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmfkc-0001Y8-1s for ged-emacs-devel@m.gmane-mx.org; Thu, 05 May 2022 13:58:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmfHp-0000nA-Eb for emacs-devel@gnu.org; Thu, 05 May 2022 13:29:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmfHn-0005Ot-Vz; Thu, 05 May 2022 13:29:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZZ8eXkSrLV7+jP78CkZ0o1VcuXrpdpS7H6WMNWmRwUE=; b=dYh4OEZd+LU9 0+8Vi/bUfF/c+qzfnvnRxd7Xg7wcC3zBoP+U5iun3Ib9oHj8vRu/HrCB98gcg3Jd3LY+/10JnJ/5+ 0eYVwCW496FpYbijjWX8BitlN3Myw3fMNCvEpf0zFPZOGo3FuxsRznkgxXFL2UmEvFqxExBEb/fv4 zAPyMKNvhj7hPw/sX7xnrJiRbzat4gSa4eBCX9m4az5JdeYhANGBqxygQQe44SpgNpjFAc7UoFVwG pKe1XjDAvYxGJKhdkEAhXqDgFTncbczMQyXmUke5qka15kAryfE5RjpG2mWlI5XpWO8YNK5XYA+D2 BtmzO8T/RmC8MtS89H4yIg==; Original-Received: from [87.69.77.57] (port=3838 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmfHn-0007iv-EN; Thu, 05 May 2022 13:29:07 -0400 In-Reply-To: (message from Alan Mackenzie on Thu, 5 May 2022 16:57:55 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289257 Archived-At: > 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 > > > > From: Alan Mackenzie > > > > 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 TAB on all > > > these misconfigured keyboards. I think that is a lesser evil than > > > failing to recognise 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 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.