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.bugs Subject: bug#67661: 30.0.50; *Completions* has started popping up for icomplete-in-buffer Date: Sat, 09 Dec 2023 15:25:45 +0200 Message-ID: <8334wby0bq.fsf@gnu.org> References: <87o7f3e4cb.fsf@melete.silentflame.com> <83wmtr2mye.fsf@gnu.org> <87lea3wpai.fsf@zephyr.silentflame.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4698"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67661@debbugs.gnu.org, juri@linkov.net, 67001@debbugs.gnu.org, spwhitton@spwhitton.name To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 09 14:27:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rBxMP-00012l-Ai for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Dec 2023 14:27:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBxM3-0000SA-9v; Sat, 09 Dec 2023 08:26:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBxM1-0000Rv-7l for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 08:26:49 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBxM0-0007UX-Re for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 08:26:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBxME-00081h-9S for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 08:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2023 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67661 X-GNU-PR-Package: emacs Original-Received: via spool by 67661-submit@debbugs.gnu.org id=B67661.170212838630788 (code B ref 67661); Sat, 09 Dec 2023 13:27:02 +0000 Original-Received: (at 67661) by debbugs.gnu.org; 9 Dec 2023 13:26:26 +0000 Original-Received: from localhost ([127.0.0.1]:46993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBxLd-00080P-Tz for submit@debbugs.gnu.org; Sat, 09 Dec 2023 08:26:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBxLb-000803-Hk; Sat, 09 Dec 2023 08:26:24 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBxLI-0007Re-CX; Sat, 09 Dec 2023 08:26:04 -0500 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=MzeBrVVcwHpA8dfUdt7VNeg12K6uTWukXZbHCOWbgnQ=; b=BK42nc/aTzkR l7Y9kBa6ocrD1+feP6R0A09C1n5kMdsZ9ntPld61IG1kHy5Sdil2FKu2bk5bvQABQDRh8QLZS1oFT mvlucXIZdAllZ38i/UGOoOX9ExhDiMEePxeU94g2GmVphXeAdnypO8+hAa+kDjshjQDilVghtyB50 xADYesQaGiHyQcJVi0rdEGe3EbDrCWVBatyWQH7gaS8ixZHFHpB8pYSGzV+EMs9GDAFGOxZ8MqVa8 N6bThNJY58A3nAyKZEtjE1rUayXnsvTWYfKVxmsZrYP7hWK8Wz6F+Qh47ywScUnjruCxSUEIQ1W3R VCRvIdTAiLSUC2WQo19rbg==; In-Reply-To: (message from Eshel Yaron on Sat, 09 Dec 2023 14:08:45 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275850 Archived-At: > From: Eshel Yaron > Cc: Juri Linkov , 67661@debbugs.gnu.org, Eli Zaretskii > , 67001@debbugs.gnu.org > Date: Sat, 09 Dec 2023 14:08:45 +0100 > > Sean Whitton writes: > > > Previously you would get the icomplete in buffer completion. Now, > > additionally, *Completions* pops up, but it doesn't make sense to have > > both. > > I agree that having both interface together is a bit much, but AFAICT > that has been the case at least since Emacs 27 whenever the text before > point was the longest common prefix of several completion candidates. > For example, try completing "l" instead of "ls" in eshell. On both > Emacs 27 and on master, this shows both the *Completions* buffer and the > in-buffer `icomplete` interface. Is this what you get as well? This is not the regression that needs to be fixed here. > > On Wed 06 Dec 2023 at 08:41pm +02, Eli Zaretskii wrote: > > > >> AFAICT, the above description of the problem is inaccurate. The > >> *Completions* buffer would pop up in previous versions as well, but > >> only after a second TAB. Whereas the in-buffer completion would show > >> after the first TAB. Now in Emacs 30 after the first TAB nothing > >> happens, and after the second TAB you see the same display as > >> previously after the second TAB: both in-buffer completion and the > >> *Completions* buffer popped up. > >> > >> So I think the problem is that the first TAB does NOT show in-buffer > >> completion anymore in the above scenario. > > > > Commit 5416896d608 is responsible for the problem. > > It would seem that it turns off completion-in-region-mode too early. > > IIUC, the problem of showing both interfaces is inherent to how > `icomplete-in-buffer` is implemented. Once again, the fact that the second TAB shows both completion interfaces is not the problem: as you point out that was how Emacs behaved since long ago. The problem here is that the _first_ TAB does NOT show in-buffer completions. This should be fixed, since it is a regression wrt Emacs 29. > It's just that in this case of > completing "ls" the *Completions* doesn't show up at first because it's > an exact match. What allowed the `icomplete` to show up is that > although the *Completions* buffer wasn't shown, > `completion-in-region-mode` would remain on, and that caused only the > `icomplete` interface to appear in this specific case. > > The reason we now disable `completion-in-region-mode` when it doesn't > show the *Completions* buffer, is to avoid having the key bindings that > this minor mode sets up from lingering and shadowing other bindings. That sounds like some very technical problem, and it should be fixed by some other means than disabling completion-in-region-mode. > If it doesn't make sense for `icomplete-in-buffer` to appear along with > the *Completions* buffer Again, this is not the problem to solve.