GNU bug report logs - #81537
32.0.50; Fixing icomplete-in-buffer requiring users to advice-add

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Sean Whitton <spwhitton@HIDDEN>; Done: Sean Whitton <spwhitton@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 81537-close <at> debbugs.gnu.org:


Received: (at 81537-close) by debbugs.gnu.org; 8 Aug 2026 13:08:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 08 09:08:08 2026
Received: from localhost ([127.0.0.1]:57007 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wsgmW-00080J-5J
	for submit <at> debbugs.gnu.org; Sat, 08 Aug 2026 09:08:08 -0400
Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]:41959)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wsgmU-0007zh-0g
 for 81537-close <at> debbugs.gnu.org; Sat, 08 Aug 2026 09:08:06 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfhigh.phl.internal (Postfix) with ESMTP id D640714000E6;
 Sat,  8 Aug 2026 09:08:00 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-04.internal (MEProxy); Sat, 08 Aug 2026 09:08:00 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786194480; x=
 1786280880; bh=vUXj7Mebokxv/u1FSTZss72hIGv8qeJoVS2ljQQv2Fw=; b=d
 9o5+rSAavLJ3d2LfBjIYOGcKVdd+6vFoB8mgNQM+kfXHdAUlT9beYwo0lBgZ5Ore
 msS+PYvA7/WEdX0dGhd4ZtsBUIda2XPa3OMZl6esQKiAehfx3ZKn+VbMmwKnkFDv
 EVdTxTZit/+2tGsSoLURBQ9ukDGY6swMstq5rtgRqgTn+hHy9QIpt/JceyDxlb14
 Bg8Yseq1DuygbsLmMuyAda3EQ+VjCtXpuF5JsM61qw2wxMG6Pb9B/VNxX0UYuwZx
 k7Z2KFG3FIgFjRtlYFDp3Uqc2O1OGHVPCXCfZSui41/rt1/u4qskKuORSNQQntp3
 j6hjTulG9xgExOi5o+4LA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786194480; x=1786280880; bh=vUXj7Mebokxv/u1FSTZss72hIGv8qeJoVS2
 ljQQv2Fw=; b=aIozqCtXB0NFr+jQU7G5wX48PMKMO9auKSOl0fqJorNxLchqulk
 R+FccQQDY3T5dFo28dPitl/Nme+vCTjDC/kh+aaKIZdiMQW4tXnTaSuzZRxmERfc
 KE64Lx7PS+C6oXuRfd8Eui3dPquZ1MQsm5zRbxkVD0f0CQz3lhc0TYxudGrcWxDy
 CiI+9+abt2gHDaiY4cllcWv0AgDr7uA/u9hF0D32Ma9JrUrbRDjSGVl+YxejLkOY
 r1Y0g9IPJlAEFrtUtSOs9DSIYjLjb9+OOpbUSAM6l8A63BPtgzMVRk4LAUUmjI3c
 j5qzurZOXL9RAwTmajzrVQ/7kjdaTxoSppA==
X-ME-Sender: <xms:MCp3ajxq6F7u6tHPdIj-oZofK3s9K9JsOEL5ksa5VZRy3TWQT-kKZQ>
 <xme:MCp3apEx1wijxWkSmrzxvRy0joLEV7Y4A8FrSKPoeRIPNLaHPR7bKg1e2GvKyIVj2
 RZ-1wPDQ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n9UQ>
 <xmx:MCp3alM8Qobtmp8b8GJPhx3xuBVhyTewjplg8T51a8uHW0u9n-KDlA>
 <xmx:MCp3anGohx7FfLeN-TcSG4PznYoSC0Jq5ScTAsHAl0JsJFVBj52sr6Le>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 8 Aug 2026 09:08:00 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id B6ACF940F74; Sat, 08 Aug 2026 14:07:57 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87wlu2dpo0.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN>
 <87ecgb7sbu.fsf@HIDDEN>
 <87y0ejzdjk.fsf@HIDDEN>
 <87wlu2dpo0.fsf@HIDDEN>
Date: Sat, 08 Aug 2026 14:07:57 +0100
Message-ID: <87tsp4vjyq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537-close
Cc: 81537-close <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eshel Yaron [07/Aug  3:29pm +02] wrote:
> Sean Whitton <spwhitton@HIDDEN> writes:
>
>> Eshel Yaron [06/Aug  7:04am +02] wrote:
>>> So I'd say it currently seems that the completion-in-region-function API
>>> can/should be enough for icomplete-in-buffer.
>>
>> To be clear, I haven't given your patch any live testing, because I
>> don't think changes that invasive can be justified.
>
> Well, my patch affects only icomplete-in-buffer users, whereas the
> alternative you recently implemented touches code that virtually all
> users run.  The way I see it, using the existing API in icomplete.el
> is the less invasive approach: it confines the changes to where they
> belong.

Very fair point.

>> As I think that Icomplete logic in minibuffer.el is acceptable in this
>> case, I'm not going to work on this directly, but very happy to review
>> and discuss.  If you're not going to work on this imminently, though,
>> let's close the bug again.
>
> OK, feel free to close it.

Okay, will do, hope someone will come up with good semantics for a hook
so that we can replace mention of Icomplete in minibuffer.el at some
point.

-- 
Sean Whitton




Notification sent to Sean Whitton <spwhitton@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Sean Whitton <spwhitton@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 8 Aug 2026 13:07:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 08 09:07:36 2026
Received: from localhost ([127.0.0.1]:57001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wsglz-0007z8-Oy
	for submit <at> debbugs.gnu.org; Sat, 08 Aug 2026 09:07:36 -0400
Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]:36189)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wsglx-0007yv-PY
 for 81537 <at> debbugs.gnu.org; Sat, 08 Aug 2026 09:07:34 -0400
Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 7304614000F7;
 Sat,  8 Aug 2026 09:07:28 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-05.internal (MEProxy); Sat, 08 Aug 2026 09:07:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786194448; x=
 1786280848; bh=SjXSkPj9kDqLJjXO7z1UPyes3ofdK0Kpl8TPTTelO5I=; b=j
 UuXhm6nkgCYivKJRFfJPh8gyMpI2LS7pLIleF4fBEhtKT5y8CgGhcqcLYnDYLDEV
 jnrYE185HqGRH3ZIEXg/3m4SoODTQD15q3s77CfuRqNCkAagC8CkpNmnJscMExm5
 GVZqQN2tzCwZ19qCT+9v/qGdcjgE4LYjP6leG23FaGW7YNUac4n+53nUndmlWoTq
 a4NGs6BD3Hb6CorlV2RkLPSI4+U1HUcqHRecBBpUzMOeT/SCWv5uPjZP0GI+Y4jb
 rwruDK9cUznBnegxEYSGjOA9w5nrUIuVlJJw8oTbmP3WYyoqARlt0upVmZxjTlWK
 TcSpQhE0RGLo3t1/B3drA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786194448; x=1786280848; bh=SjXSkPj9k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igmRjPAgvUSMFl5j/ilH93pei/eDEv2jc0j695DNo9vZslj3KXyZ9pbeltSj/jr7xq
 i/wqTbTU1scfcsGE3BlmIkX7e3p7Vjo9EklCseKJQAlYjwFIcdh+/Py4orf0schOzWPkNb
 Q/HCsWGoAGaoCUATpHTrh49YkBlSu4C/oB7cAAPQ9YsCWJOoFCnKGwjOBjpgkr/8//gjgX
 QmZ+06aKHwsQeep6T5Gwd+bJvnk1vt38HJOZeZ2xoWNuH3nYLKaa6mE8YEr3ym1RDD4/YE
 hWfCilkeEGCheKiv6abGbdevA+tnPY+UYlhjAf/jSlitffg1MMsRcVo0TPzA
X-ME-Proxy: <xmx:ECp3apnGEoytqgio-7_Isl5iOhYJTKaGZGbT0wGNyGQBOZj8AWBOXA>
 <xmx:ECp3aqMYY81RbQ5iz2kKSRjyfzap_h1D3z5KEr_24wl6jrPu0eg-mg>
 <xmx:ECp3av3VxKZPd7_c7wTrEcFDnHupuwyJw49nYP4Sp8fV6CTrLSrADQ>
 <xmx:ECp3apn9Xii_gX-jPycUNglXjcIY9ShT_PvWkRLSjB_8MAPtjAU8fw>
 <xmx:ECp3asfg813jpKEfrb9agTJIXtFSMn_DjKM8CE8DxV8QsS__YRweOir2>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 8 Aug 2026 09:07:27 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id A5656940F74; Sat, 08 Aug 2026 14:07:25 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87qzk995x9.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN> <877bm48ka4.fsf@HIDDEN>
 <871pcb1o45.fsf@HIDDEN> <87cxvv15kh.fsf@HIDDEN>
 <87jyq2xljr.fsf@HIDDEN> <87qzk995x9.fsf@HIDDEN>
Date: Sat, 08 Aug 2026 14:07:25 +0100
Message-ID: <87wlu0vjzm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [07/Aug  8:49pm +03] wrote:
> So what remains to do here is just to remove mentions of
> package-specific prefixes "icomplete-" from the general file
> minibuffer.el by adding a new hook like e.g. 'disable-completion-list'.

Yes.  I'm not sure quite how to go about it myself, but would be
interested to review any proposed patches.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 7 Aug 2026 17:53:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 13:53:42 2026
Received: from localhost ([127.0.0.1]:48232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wsOlJ-00004q-RD
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2026 13:53:42 -0400
Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]:50006)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wsOlC-0008Vg-UY
 for 81537 <at> debbugs.gnu.org; Fri, 07 Aug 2026 13:53:35 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:b231:465::2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4hGsFg09pcz8txY;
 Fri, 07 Aug 2026 19:53:27 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1786125207;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=4kSqqiOGIIkSXUq2GUS5J0PRkMbfGPH+p05Z50O/37A=;
 b=y9sSmJ2IyRjXFS9r0nR21/HIbjxzboHQnLBW9adOPedwNiDECwxFJKt4UiYPzIdWo8cWNM
 3XVH5utss74imxqTkgCG6BF0MwC2AsZx22wZNauxrRcwMUa7uS19r2qCBWVLNNzzywE44u
 Ygnv7LW778EyjfEavH6g2Ehtauw8Z+4G54EfYCAMCE4aJflhtN1IUw99ncRaFNhvR7RA0G
 3f2dp4lMdYdEz1/Kqx2JQk5H/PtUHzK+X9fmb/6McDH4akotQBHmT0M2+v/cYo7av5YJFt
 bDtoCzKIURyP5T6A5Ke9L6DaJrbgUYJ1yd3rzTUXuzhCK02l84KCvEkNRPXmCQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87jyq2xljr.fsf@HIDDEN>
Organization: LINKOV.NET
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN>
 <877bm48ka4.fsf@HIDDEN>
 <871pcb1o45.fsf@HIDDEN>
 <87cxvv15kh.fsf@HIDDEN>
 <87jyq2xljr.fsf@HIDDEN>
Date: Fri, 07 Aug 2026 20:49:54 +0300
Message-ID: <87qzk995x9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4hGsFg09pcz8txY
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Either I am misunderstanding you or I completely disagree, as an
> Icomplete user for a long time.  It would be a huge distraction if
> Icomplete kept showing up during ordinary typing, just because
> completion was possible.  And, I specifically want Icomplete to replace
> *Completions*, because they serve basically the same purpose.
>
> What you are describing sounds more like completion-preview-mode.

Yes, this is more like completion-preview-mode.

So what remains to do here is just to remove mentions of
package-specific prefixes "icomplete-" from the general file
minibuffer.el by adding a new hook like e.g. 'disable-completion-list'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 7 Aug 2026 13:30:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 09:30:00 2026
Received: from localhost ([127.0.0.1]:44375 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wsKe8-0005aL-5M
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2026 09:30:00 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:41246)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1wsKe4-0005aC-P2
 for 81537 <at> debbugs.gnu.org; Fri, 07 Aug 2026 09:29:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1786109396;
 bh=0IhAFcGeK0pPnSo6Fp/ZdDNxs5E5XJQRWkb5zpTmdC4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=dLSlqFMSQ7uLS6isqJ05sHr3ftgPZ4tvmP6Odryf6jVNlTMHvsGW18xk7iAXEXc+m
 2NIUheZGOxsjdN8MWnlD2dXU9rCzD+4C9UzmHosTatmt0Ggf6BCK0ch0+OfmU1Hyxj
 oGmA4wZLlgbJT/0wDpVKxp5SpmRUIizH/snUq7+S4RxiNFmt7plcOLpe7keHSEdI7D
 wkXWRjDv4XvrHxqx+TITupq5WzmrPMKhts3+0zolexwATCEwBqkRGsXbLrL/073p0m
 b3hj0UzKkT4+ny2jwz95z1Gyt1+5fTIR7EFCNZWIb742G+W4cScnBLh1snXxzg+EZd
 oVQLLiwINcV/A==
From: Eshel Yaron <me@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87y0ejzdjk.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN>
 <87ecgb7sbu.fsf@HIDDEN>
 <87y0ejzdjk.fsf@HIDDEN>
Date: Fri, 07 Aug 2026 15:29:51 +0200
Message-ID: <87wlu2dpo0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Eshel Yaron [06/Aug  7:04am +02] wrote:
>> So I'd say it currently seems that the completion-in-region-function API
>> can/should be enough for icomplete-in-buffer.
>
> To be clear, I haven't given your patch any live testing, because I
> don't think changes that invasive can be justified.

Well, my patch affects only icomplete-in-buffer users, whereas the
alternative you recently implemented touches code that virtually all
users run.  The way I see it, using the existing API in icomplete.el
is the less invasive approach: it confines the changes to where they
belong.

> As I think that Icomplete logic in minibuffer.el is acceptable in this
> case, I'm not going to work on this directly, but very happy to review
> and discuss.  If you're not going to work on this imminently, though,
> let's close the bug again.

OK, feel free to close it.


Regards,

Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 7 Aug 2026 10:38:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 06:38:44 2026
Received: from localhost ([127.0.0.1]:43535 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wsHyN-00056S-Vl
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2026 06:38:44 -0400
Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]:37693)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wsHyM-00056F-2p
 for 81537 <at> debbugs.gnu.org; Fri, 07 Aug 2026 06:38:42 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 8F5A17A0141;
 Fri,  7 Aug 2026 06:38:36 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-04.internal (MEProxy); Fri, 07 Aug 2026 06:38:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786099116; x=
 1786185516; bh=G9h19D/aLVgUzMKuy3yUxYWBo5t+UdLxs8ex6XR+KkY=; b=k
 tgd2V9t9dToS0hkiwvqlxwGAHYHz6QFuYY1wY/n7UBeEMlvIXymu7fKlPa5bbF4d
 eG7pO/yOpxC2F1g9uU+vzYBr1L6oiMcMPghw25ImDV26MGqYkwRjBoxKeJ8uWwgw
 ieF3n7loKapvqEeEWI0mZclKhc1X5ScciiqD1B6C0s9pyrrXDeYkYc+K+F8hTAxf
 vyN1YWZ2rFG7bi3VshtvtDF2qzWufWyIc9JkM2LyIWFL5bYne5jnRmHiZO+fE+bj
 tUJpWF9L+3A0bfaIuSZ6udHYCCSr2b0OYSe5rTOBhkgzAXa9gVhR+9B+kRerYokI
 nBxwBOUJTpoCko6wzvKbQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786099116; x=1786185516; bh=G9h19D/aLVgUzMKuy3yUxYWBo5t+UdLxs8e
 x6XR+KkY=; b=kil82OydwfmWNktlmFCVqXyULdtopOeFuY7wDVPFmhZ0i+MHiC7
 GfdAcdxzH1D8yPPIDih5Ynhmdk0UzLNCYtFLp8wqDMG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il9Psl/WQQDx
 D8M+Vk1z2Bi1zK9oC3rLmRvhnYkzrRGvy4B5RUIRCd2kBXl/vRmP0OgT6XELl7SQDgxeuh
 mL64cH9LK4OcFKXyXH0aPMekQywLljlZpwpK4cG0I0ivDM63FDw7TO/C3IwliYu+02emXI
 PJdWUmTKToHwX4xVU+xhT7h9qcQXvkwOFsurZ2iyVQyykqgS4zftpaR3RNhA
X-ME-Proxy: <xmx:q7V1auprYk1EUWj0KDvsnuiesaxcvzE8PdUqkMLsngzB6P6zuEajlA>
 <xmx:q7V1aiBCf09GnBlPc_GN5xqL0QwZmGEWTerSo9FSF6AiTUrAon_qOQ>
 <xmx:q7V1ajbORP-b4L49pn958dt4RgKTlFtkA_nQE7Jugw8-_Ext4m9t3Q>
 <xmx:q7V1at7jahKurVSzC4haOgr3QYl3c1hhBFQNdMEAmbK6ugIq4Uuxfw>
 <xmx:rLV1akRPmjSgsrR86b8wNKz2h-7fuWzM1gqHg5fWQ-p37JLQ_g4-P7Ir>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 7 Aug 2026 06:38:35 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 9B2C3940AAB; Fri, 07 Aug 2026 11:38:32 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87cxvv15kh.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN> <877bm48ka4.fsf@HIDDEN>
 <871pcb1o45.fsf@HIDDEN> <87cxvv15kh.fsf@HIDDEN>
Date: Fri, 07 Aug 2026 11:38:32 +0100
Message-ID: <87jyq2xljr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [06/Aug  9:12pm +03] wrote:
> I still don't understand why should we suppress displaying of
> *Completions* after the user types 'C-M-i' (completion-at-point)
> whose primary purpose is to display the *Completions* window
> like 'TAB' (minibuffer-complete) does in the minibuffer
> even when icomplete-mode is enabled.
>
> Can we step back and rethink this feature?  When doing it right,
> displaying inline icomplete completions should not require typing
> a special key.  It should show completions immediately like
> icomplete-mode already does in the minibuffer.

Either I am misunderstanding you or I completely disagree, as an
Icomplete user for a long time.  It would be a huge distraction if
Icomplete kept showing up during ordinary typing, just because
completion was possible.  And, I specifically want Icomplete to replace
*Completions*, because they serve basically the same purpose.

What you are describing sounds more like completion-preview-mode.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 6 Aug 2026 18:13:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 06 14:13:56 2026
Received: from localhost ([127.0.0.1]:37697 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ws2bJ-0006dc-Gv
	for submit <at> debbugs.gnu.org; Thu, 06 Aug 2026 14:13:56 -0400
Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]:34374)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1ws2bE-0006cE-9C
 for 81537 <at> debbugs.gnu.org; Thu, 06 Aug 2026 14:13:51 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:b231:465::2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4hGFlP0fB9z8v2Z;
 Thu, 06 Aug 2026 20:13:37 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1786040017;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=ICCuMW4FPS1A61+kFPqR7hjrosxxFrwgTYqBSWVy/1g=;
 b=C3Pzn9rCtDMtgl2uWznr/FpD7SMQxdkVpntN1hPUz3bkjrU61ruslJ/5t9j+4rP6TckAWO
 rAGrAREH5W3r0C3USi5KBGuW0T6BHq1Z2tA7LoYrp8RtHNtwxvwsTzXPRba4dPHnTA3we2
 N7mx4ce4G73eXiLIxtuQhILRQ51VyXAM76Jo9A34x+ywBQvw3wsAOVa8mhsn/LonJCR3CK
 ydz+kPf4lx3OexOls3PG361mAo4qwPL/CRuAkzJHDiKxKHPZaT0SfdxNVTkkxNrKMQDZTi
 Bcqu0uaEzgi3PUM4JUohBSuRp0SsfH78PyeGAdIaeMimyE/DAxvcd0QUdJS23A==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <871pcb1o45.fsf@HIDDEN>
Organization: LINKOV.NET
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN>
 <877bm48ka4.fsf@HIDDEN>
 <871pcb1o45.fsf@HIDDEN>
Date: Thu, 06 Aug 2026 21:12:30 +0300
Message-ID: <87cxvv15kh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4hGFlP0fB9z8v2Z
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> The simplest way to do this would be to use the new
>> 'display-buffer-default-alist':
>
> Thanks, though, this is inefficient -- I think we should avoid calling
> all the code in minibuffer-completion-help if we don't want to display
> *Completions*.

I still don't understand why should we suppress displaying of
*Completions* after the user types 'C-M-i' (completion-at-point)
whose primary purpose is to display the *Completions* window
like 'TAB' (minibuffer-complete) does in the minibuffer
even when icomplete-mode is enabled.

Can we step back and rethink this feature?  When doing it right,
displaying inline icomplete completions should not require typing
a special key.  It should show completions immediately like
icomplete-mode already does in the minibuffer.

This will require implementing global-icomplete-in-buffer-mode
and per-buffer icomplete-in-buffer-mode with post-command-hook.
I could try to do this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 6 Aug 2026 11:36:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 06 07:36:28 2026
Received: from localhost ([127.0.0.1]:33658 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrwOi-0008K7-9U
	for submit <at> debbugs.gnu.org; Thu, 06 Aug 2026 07:36:28 -0400
Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]:44481)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrwOg-0008Jq-Nk
 for 81537 <at> debbugs.gnu.org; Thu, 06 Aug 2026 07:36:27 -0400
Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
 by mailfout.phl.internal (Postfix) with ESMTP id 777D5EC0904;
 Thu,  6 Aug 2026 07:36:21 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-05.internal (MEProxy); Thu, 06 Aug 2026 07:36:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786016181; x=
 1786102581; bh=AYqwRad8gruws6DKT7QnM9TwQf42FP6haRhR0I9U/PU=; b=S
 EpX+SRSTjVU7EwtKMoKMxYKw6m0k7/4lw917Xo0HAvQEs6zQEGv4fUuTGjmt8YGn
 ih/GQj0c6zJx8/CcX+rsTYCyAMPFvKFlL11Etjb7jLPsblOIeeS85kvE/cLGd/f+
 o9r7bRAVpvcZ6Jm76k6fPWGb9fmqrjJ1NiRpP/+Ez3NUHqAoFfeudStJBCp4+IRH
 bN3eJJEqxgkKG4J5uqtMUW2o8j5CN0PjJN3M+ap2J7TnGXbXz8s0OhrhQv17LRxV
 L19YRSBu9nmUTiPykGNP41VvjtZFqdZSIyh55u354S54Sv3FRxWPt46tiLbvu/w9
 wmQLwNt8RShzbr4LKyiXQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786016181; x=1786102581; bh=AYqwRad8gruws6DKT7QnM9TwQf42FP6haRh
 R0I9U/PU=; b=A/FILx5b2P9zKpOd6rDUMjOI8AROJFeuKt/U63x0aWtr7lya9bH
 JN0HpPAILwOiXZW7K6sbXR7K0qJpKiDX5ZPwAhTYMzqk549gqm2hJLY6zubwgX0l
 Rm7hXXB0xRcAssjKx8w7A/loXydSO1l20BWq5mta5aTmG0ghbX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+cqhItSwjz
 17GknrHzSvQeq6JiI4UTfDDGA0xO+Yz5MkRAJHhZfANf5/3LV5KMvh/FgGJAaP6r/Od5AZ
 XDF7zjpq7hYj9ipCUesAZ2aZKv4aSqSpHWVImz/aLAXads/gGpZmop3Is0ug
X-ME-Proxy: <xmx:tXF0agMgfc1asfEeMws6bbqkSPtVRiGFTHSHcM7uFGNRQk5jMJkKgg>
 <xmx:tXF0asVmuI2aq_Ips_trgxwIOyxbzGte28fj9arnWDIutSRloUhc0w>
 <xmx:tXF0anemobK8H-0JxTXtZLo4enoJ-8dEC0FWDUGveBX9jm-rP9nWmg>
 <xmx:tXF0aotdKZWHT0785E8-En0Xm4hMN49swrZCmb4lYJNOxEdLpNXrGA>
 <xmx:tXF0aukgEShlk8PE1Lk1M6occNXijiEjXk4xmba0MOIQi7KycrTQ6jce>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 6 Aug 2026 07:36:21 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 91FC09411D2; Thu, 06 Aug 2026 12:36:15 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87ecgb7sbu.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN>
 <87ecgb7sbu.fsf@HIDDEN>
Date: Thu, 06 Aug 2026 12:36:15 +0100
Message-ID: <87y0ejzdjk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eshel Yaron [06/Aug  7:04am +02] wrote:
> Hard to say: you didn't quite tell what it is that you want, although
> I understand it's trying to see if there's just one possible completion
> under some conditions.

If there is just one possible completion left after the command has been
run, then my code does (completion-in-region-mode -1) to free the user
from having to type C-g.

> But more importantly, whatever it is exactly, there's nothing wrong with
> relying on implementation details in you private config; it just comes
> with the understanding that you may need to adapt when the
> implementation changes.  Right?

The approach you describe is perfectly reasonable, yeah.  I prefer only
to use public APIs in my private config, though.

But in any case it's not your job to work this out for me if there isn't
an obvious answer, so let's leave this aside :)

>> Not yet.
>
> Alright.
> So I'd say it currently seems that the completion-in-region-function API
> can/should be enough for icomplete-in-buffer.

To be clear, I haven't given your patch any live testing, because I
don't think changes that invasive can be justified.

> To be clear, I don't advocate this approach (yet): it only treats the
> most painful symptom of the current code (Icomplete-specific logic in
> the completion infrastructure), while a proper remedy would be using the
> pre-existing API with no changes in minibuffer.el.
> Also, I don't know what you'd like FOO to be, or if/how the hook should
> be documented...  If this is the approach you prefer, I'll have to leave
> these final details to you.

As I think that Icomplete logic in minibuffer.el is acceptable in this
case, I'm not going to work on this directly, but very happy to review
and discuss.  If you're not going to work on this imminently, though,
let's close the bug again.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 6 Aug 2026 11:32:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 06 07:32:08 2026
Received: from localhost ([127.0.0.1]:33640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrwKW-00086l-AP
	for submit <at> debbugs.gnu.org; Thu, 06 Aug 2026 07:32:08 -0400
Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]:43011)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrwKT-000867-V7
 for 81537 <at> debbugs.gnu.org; Thu, 06 Aug 2026 07:32:06 -0400
Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 528B5140003A;
 Thu,  6 Aug 2026 07:32:00 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-02.internal (MEProxy); Thu, 06 Aug 2026 07:32:00 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1786015920; x=
 1786102320; bh=Iq7QmajGlvigAVIQute4r65WvTD5doLfp8z+o7aQJtc=; b=G
 eVvebof/QvwlDO3++xopnAVm3076EogltuMtZZexDXMdvFtj9o1As6k1CXx7uZq2
 D1iMNevefi4nshzX7cMNvji3iFqQjY/0BySqFCqw7Go0aE32N7s+2x0cRFJUJse2
 kV9FIkYY9SYmcB7b6ZpUW6WIDQpBSyEOKuighpViUdp6UPrDiTsPKR9w6ghNbdqc
 z8QMMchJkcBltBhJjRuUK9G3V42DkTXzbFaPTzKYw/0tlT4zN4fijNeE3x5/+V2t
 oXOh2BWmZ1hnNlEHlYhSCD9hyvakvgLZ2HLPymypAYu689x+i1UHD8qfxtkyz1cn
 ZqwuCzOEy7/lGDEJFGyOw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1786015920; x=1786102320; bh=Iq7QmajGlvigAVIQute4r65WvTD5doLfp8z
 +o7aQJtc=; b=bThWKr247cG5a218iKIXjxGXN6BpLosBxEoIMXA6gDJ4EMJRXw8
 oNVP9kmmPyp1QxT2sPAtTPs61nfnzchT0+FcB0qxcyANqk/poVSMBAvgMGX0NZZE
 sZqia4gq4NyvM4Z1u3GJuUQbQ9Eyke3OHBMD9EWMdZOmAcOnbASPkiA03PZ28U7j
 Kh6gqMyMBirFMCy8UEFMki209VkVdTOmWRScuC5Wz3LVCJP6Lj+T2P7w0xQNrdEC
 bQVwvvGvdcAhiPB9/SnR6IHqFKjgO9tnTk5ppx5W4HeXr5I4aG4/Saj55qDvJ2bl
 /YqniHHfcCZykMaKUJfXzUsobO4K5P/gUyg==
X-ME-Sender: <xms:r3B0apDf4JxqCg1dgggc66lym7h7CnII6PoLFAgYuXasZcXFBb8oKQ>
 <xme:r3B0alWeeqb48Wg_6ujNxCOx_6o49zWjjzxsQ7i10ar_6E44mZghsDlgNPF5tsojA
 vtXvjL7heKG5iPf_vpoKFWd1cirO8FtxehZvA9AoSYG6K__rzXW3Otc>
X-ME-Received: <xmr:r3B0avD9EmYjSpQOUpY-PUXJr2sH-Of-Agv2auc9kabt7AK7XiL4Caevhy3wEX_VCd4KPTHtt20OKbNdf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fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 6 Aug 2026 07:31:59 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 347459411D2; Thu, 06 Aug 2026 12:31:54 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <877bm48ka4.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN> <877bm48ka4.fsf@HIDDEN>
Date: Thu, 06 Aug 2026 12:31:54 +0100
Message-ID: <871pcb1o45.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [05/Aug  9:50pm +03] wrote:
>> Is there some other way to do what I want that you might suggest?
>
> The simplest way to do this would be to use the new
> 'display-buffer-default-alist':

Thanks, though, this is inefficient -- I think we should avoid calling
all the code in minibuffer-completion-help if we don't want to display
*Completions*.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 6 Aug 2026 05:04:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 06 01:04:32 2026
Received: from localhost ([127.0.0.1]:59051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrqHP-0004pX-HA
	for submit <at> debbugs.gnu.org; Thu, 06 Aug 2026 01:04:32 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:52660)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1wrqHN-0004pN-JQ
 for 81537 <at> debbugs.gnu.org; Thu, 06 Aug 2026 01:04:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1785992668;
 bh=r/8NCPEre8e60tpkdplL2DE3KUm2j+UQyG7mSKdWLac=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=siDn+K9VOJwIZzpHJexw3CJBnEDyg03Vq36PdqKeIMu22ho62tcPoHIiPAG1J0ohg
 MEM4PU4NWSGKzIMn2O0jsmLFKfhk8VdzHuLHlLTyxDRA59WGmio2BvplA/kX5TiHka
 kEs2qkAtgG2k4rz3IjY7y1b4Hzk60gXpYUN4Xzm2EnHAdUpFncXoB24lSbnElPZ2XH
 59QTc8yC5UapLKvX3Qcw5HklKGKVrXFNE88yiwtdCTXG4/lTnFAnu97trG/I20Vyfm
 5a0vdoDdplikNVx5Wv7mcWEm6FaP7oX+X+AQMkVOTMKotDkQ5P4Mgl3vR3iZp5xerT
 TuLvnn6m9lPkw==
From: Eshel Yaron <me@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <875x1o3nuh.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN>
Date: Thu, 06 Aug 2026 07:04:21 +0200
Message-ID: <87ecgb7sbu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Sean Whitton <spwhitton@HIDDEN> writes:

> Eshel Yaron [04/Aug  6:30pm +02] wrote:
>>> I have a command which finishes by adding :after advice to
>>> icomplete-post-command-hook.  In that advice it does something on the
>>> condition that (length= completion-all-sorted-completions 1).
>>
>> Got it.  I wouldn't worry about retaining compatibility with something
>> like that anyway, since completion-all-sorted-completions is very much
>> an implementation detail.  But as it happens, I think it should work
>> also with my patch.
>
> Okay, I guess that I should have noticed the absence of a docstring
> before using it, back whenever it was I first did.
>
> Is there some other way to do what I want that you might suggest?

Hard to say: you didn't quite tell what it is that you want, although
I understand it's trying to see if there's just one possible completion
under some conditions.
But more importantly, whatever it is exactly, there's nothing wrong with
relying on implementation details in you private config; it just comes
with the understanding that you may need to adapt when the
implementation changes.  Right?

>>>> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
>>>> index c8da0e9bf9b..7b7d10f96fc 100644
>>>> --- a/lisp/icomplete.el
>>>> +++ b/lisp/icomplete.el
>>>> @@ -537,6 +537,39 @@ fido-mode
>>>>      (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
>>>>      (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))
>>>>
>>>> +(defun icomplete-in-buffer-force-complete-and-exit ()
>>>> +  (interactive "" icomplete-in-buffer-mode)
>>>> +  (minibuffer-force-complete
>>>> +   (icomplete--field-beg) (icomplete--field-end) 'dont-cycle)
>>>> +  (icomplete-in-buffer-mode -1))
>>>> +
>>>> +(defun icomplete-in-buffer-abort ()
>>>> +  (interactive "" icomplete-in-buffer-mode)
>>>> +  (icomplete-in-buffer-mode -1)
>>>> +  (keyboard-quit))
>>>
>>> This part of your patch is what worries me the most.  We have had very
>>> long discussions about getting the several different exiting functions
>>> *just* right, over the years.  I'm loathe to add more subtly different
>>> ones.
>>
>> Is there some documentation of that "just right" behavior?
>
> Unfortunately not, though, there are the old bugs that you could
> re-read.  I wouldn't recommend it!
>
>> Or specific things you notice that aren't just right?
>
> Not yet.

Alright.
So I'd say it currently seems that the completion-in-region-function API
can/should be enough for icomplete-in-buffer.

>>> I'd like to see your proposal for adding a hook but I may have similar
>>> trepidation about installing it ...
>>
>> It's just a mechanical change: rename completion--icomplete-in-buffer-p
>> to completion--FOO (where FOO doesn't include "icomplete", or any other
>> frontend name), and replace its Icomplete-specific body with:
>>
>>   (run-hook-with-args-until-success completion-FOO-functions)
>>
>> Then, in icomplete-mode, add the current
>> completion--icomplete-in-buffer-p to completion-FOO-functions.
>> That should preserve the exact behavior of the existing code, and so
>> hopefully avoid that trepidation. :)
>
> That sounds fine to me, though I'd like to see the patch before
> installing.  Thanks for figuring out this proposal.

To be clear, I don't advocate this approach (yet): it only treats the
most painful symptom of the current code (Icomplete-specific logic in
the completion infrastructure), while a proper remedy would be using the
pre-existing API with no changes in minibuffer.el.
Also, I don't know what you'd like FOO to be, or if/how the hook should
be documented...  If this is the approach you prefer, I'll have to leave
these final details to you.


Best,

Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 5 Aug 2026 19:02:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 15:02:43 2026
Received: from localhost ([127.0.0.1]:54070 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrgt1-0004h5-9E
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2026 15:02:43 -0400
Received: from mout-p-201.mailbox.org ([80.241.56.171]:55720)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wrgsx-0004gm-Pj
 for 81537 <at> debbugs.gnu.org; Wed, 05 Aug 2026 15:02:41 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4hFftJ2y81zMlKG;
 Wed, 05 Aug 2026 21:02:32 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1785956552;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=GqMKqe9SHb8f9UkEcrDWsOqw7Xf8t+cWTrgUIxVKgw8=;
 b=Y1G/8vqQunIvsGQEAVdUWuKFuTQtoq1FaTLkcf73pQdr9D08N/qM3/LuJeDgWf0dQIgK2s
 2odlbNpyk8jXPFF8xjBkiM3sSMk8nJtkZOUX8DjVFonvKYa3y6MuG41eePPPLOmbR7W41f
 gBh32OA9qxXEYahUuQXMLSpKFyjETv08566hvhUWxdaXrCRD4537B4Zsib89oj8HKzcpfY
 NJjnd0T4wbXHw8BIYl0phmlBgxqBu3XdpwH5zOeSCQRcWYtLNCHAn8bQ4IHChVNVAp4dXX
 3Lseit+S65MqEgu/KZrR1WPVDdfmFnpVnW7C3C9Xjjgzy+SP/OdZ/5tH2xIpCA==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <875x1o3nuh.fsf@HIDDEN>
Organization: LINKOV.NET
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
 <875x1o3nuh.fsf@HIDDEN>
Date: Wed, 05 Aug 2026 21:50:35 +0300
Message-ID: <877bm48ka4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: 4hFftJ2y81zMlKG
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

> Is there some other way to do what I want that you might suggest?

The simplest way to do this would be to use the new
'display-buffer-default-alist':


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=icomplete-in-buffer-no-window.patch

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 9a1202c30af..84780f630ff 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -163,7 +163,9 @@ icomplete-in-buffer
   (advice-add \\='completion-at-point
               :after #\\='minibuffer-hide-completions)
 "
-  :type 'boolean)
+  :type '(choice (const :tag "Disable" nil)
+                 (const :tag "Enable" t)
+                 (const :tag "Enable without popup window" no-window)))
 
 (defcustom icomplete-minibuffer-setup-hook nil
   "Icomplete-specific customization of minibuffer setup.
@@ -635,6 +637,11 @@ icomplete--in-region-setup
 		 (not (eq icomplete--in-region-buffer (current-buffer)))))
     (with-current-buffer (or icomplete--in-region-buffer (current-buffer))
       (setq icomplete--in-region-buffer nil)
+      (setq display-buffer-default-alist
+            (remove '(("\\*Completions\\*"
+		       (display-buffer-no-window)
+		       (allow-no-window . t)))
+                    display-buffer-default-alist))
       (delete-overlay icomplete-overlay)
       (kill-local-variable 'completion-show-inline-help)
       (remove-hook 'post-command-hook #'icomplete-post-command-hook t)
@@ -643,6 +650,12 @@ icomplete--in-region-setup
 	     icomplete-mode (icomplete-simple-completing-p))
     (setq icomplete--in-region-buffer (current-buffer))
     (setq-local completion-show-inline-help nil)
+    (when (eq icomplete-in-buffer 'no-window)
+      (setq display-buffer-default-alist
+	    (append '(("\\*Completions\\*"
+		       (display-buffer-no-window)
+		       (allow-no-window . t)))
+		    display-buffer-default-alist)))
     (let ((tem (assq 'completion-in-region-mode
 		     minor-mode-overriding-map-alist)))
       (unless (memq icomplete-minibuffer-map (cdr tem))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 5 Aug 2026 09:42:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 05:42:41 2026
Received: from localhost ([127.0.0.1]:48535 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrY92-0005vE-Ox
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2026 05:42:41 -0400
Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]:45397)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrY90-0005v0-3N
 for 81537 <at> debbugs.gnu.org; Wed, 05 Aug 2026 05:42:38 -0400
Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42])
 by mailfout.phl.internal (Postfix) with ESMTP id 7110EEC00F3;
 Wed,  5 Aug 2026 05:42:32 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-02.internal (MEProxy); Wed, 05 Aug 2026 05:42:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1785922952; x=
 1786009352; bh=wsYr15ULOHPJFdQyiVtZr6Ob3vUxm/rBy5u7Ot9rjIo=; b=Q
 1jSHh73IdNH57RRQhZ/nAZZFuvMEGkR1tISyXxqnTwGo8/WH2ZM6EtYKYPeoG7gw
 AmCnYybv6QE1bsWMqA6EBvf6kguByzuBbjodBbM2RZEfmR7cg61SEb0jlb4OCXVW
 Mma4kbttN1wgq3Vn0CZTHbOpCW7dK/KKjwnOHt8nD+MR7a1vaKVkCTyjPqr7xaf/
 kYtnCC1u0p95wnOtQTYrezmslTcInnXbmrklo3Vlpn5Nb6A9qIIBwvOhIZoKGkYT
 IHmQaqw/OheHT/9a1oQDZ9m+QKcpi36ZHAaUc0sV1s/MpWJpPWjqPSCYUoGREWJ6
 fG7VrDwudJ5E4qW/MhGrA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785922952; x=1786009352; bh=wsYr15ULOHPJFdQyiVtZr6Ob3vUxm/rBy5u
 7Ot9rjIo=; b=b6f8SwTd24rQD7FdzxJJ84tPBswlU98sBp896ycu47BvqVSdVxS
 ulVQdQNrVQ701KZfym/5S4QySIS509BI8quZLKDS+M6o2IN0F5GFc+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+ToGfm0besqLZZtvblQKsLXbXQzDHuB5OvB3jTe431
 R4qlho5V6873BrGcMiaTHEgXGSGsaO2/vofxUMnBLeZQ6lCRrZm3MAdrMUq6SBbXOmEM/e
 wYPaSyork8rC86Ev59ypKFVdrVsLjj25VtiFAgclhIW9BBm6CNw4a1MErFyQ
X-ME-Proxy: <xmx:iAVzak2_o0nZupQ0UTkUuQkQlxCcr-R37miSPAD_l-oO9rlERB5KYQ>
 <xmx:iAVzake1fiHwYy2QkTeKUSg1EjmZfqrHLq0ijHsSDAEXADsfJYxAYw>
 <xmx:iAVzatHfceSItnQvWIIEDER_jNgY0CQudK-R5CSnkep68wWljLLqSQ>
 <xmx:iAVzat2kUMkYWPK8HdzkrfU_GLRG_GmNVHcfKNorI3JuVj7IEA1_9Q>
 <xmx:iAVzamvBBs5WsVUPOFxykpJLgM0BjxGN6-q4TvB2bmLrBwvlOZkZ8d71>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 5 Aug 2026 05:42:31 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id D11967E17F9; Wed, 05 Aug 2026 10:42:30 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87zez1c0gg.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
 <87zez1c0gg.fsf@HIDDEN>
Date: Wed, 05 Aug 2026 10:42:30 +0100
Message-ID: <875x1o3nuh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eshel Yaron [04/Aug  6:30pm +02] wrote:
>> I have a command which finishes by adding :after advice to
>> icomplete-post-command-hook.  In that advice it does something on the
>> condition that (length= completion-all-sorted-completions 1).
>
> Got it.  I wouldn't worry about retaining compatibility with something
> like that anyway, since completion-all-sorted-completions is very much
> an implementation detail.  But as it happens, I think it should work
> also with my patch.

Okay, I guess that I should have noticed the absence of a docstring
before using it, back whenever it was I first did.

Is there some other way to do what I want that you might suggest?

>>> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
>>> index c8da0e9bf9b..7b7d10f96fc 100644
>>> --- a/lisp/icomplete.el
>>> +++ b/lisp/icomplete.el
>>> @@ -537,6 +537,39 @@ fido-mode
>>>      (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
>>>      (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))
>>>
>>> +(defun icomplete-in-buffer-force-complete-and-exit ()
>>> +  (interactive "" icomplete-in-buffer-mode)
>>> +  (minibuffer-force-complete
>>> +   (icomplete--field-beg) (icomplete--field-end) 'dont-cycle)
>>> +  (icomplete-in-buffer-mode -1))
>>> +
>>> +(defun icomplete-in-buffer-abort ()
>>> +  (interactive "" icomplete-in-buffer-mode)
>>> +  (icomplete-in-buffer-mode -1)
>>> +  (keyboard-quit))
>>
>> This part of your patch is what worries me the most.  We have had very
>> long discussions about getting the several different exiting functions
>> *just* right, over the years.  I'm loathe to add more subtly different
>> ones.
>
> Is there some documentation of that "just right" behavior?

Unfortunately not, though, there are the old bugs that you could
re-read.  I wouldn't recommend it!

> Or specific things you notice that aren't just right?

Not yet.

>
>> I'd like to see your proposal for adding a hook but I may have similar
>> trepidation about installing it ...
>
> It's just a mechanical change: rename completion--icomplete-in-buffer-p
> to completion--FOO (where FOO doesn't include "icomplete", or any other
> frontend name), and replace its Icomplete-specific body with:
>
>   (run-hook-with-args-until-success completion-FOO-functions)
>
> Then, in icomplete-mode, add the current
> completion--icomplete-in-buffer-p to completion-FOO-functions.
> That should preserve the exact behavior of the existing code, and so
> hopefully avoid that trepidation. :)

That sounds fine to me, though I'd like to see the patch before
installing.  Thanks for figuring out this proposal.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 5 Aug 2026 08:44:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 04:44:37 2026
Received: from localhost ([127.0.0.1]:48126 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrXEr-0002WN-5m
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2026 04:44:37 -0400
Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]:42805)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrXEo-0002W4-BY
 for 81537 <at> debbugs.gnu.org; Wed, 05 Aug 2026 04:44:34 -0400
Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41])
 by mailfhigh.phl.internal (Postfix) with ESMTP id B88B7140010B;
 Wed,  5 Aug 2026 04:44:28 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-01.internal (MEProxy); Wed, 05 Aug 2026 04:44:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm2; t=1785919468; x=
 1786005868; bh=9eCzdPG6Ga/wmSyS4IEiH3tJDkN18k6ylwIosi/Rdj8=; b=T
 oyjGzXQlZCvVIb7Zj9KRnH2pLZvuT4El7zSjZM5zrYH0YhLW6BydAsZGAk94b2Ki
 OByI/rQ97xFv9a2ekFUbRmSqYEM2+29zKgaThSAEbOtf5j6yxxUwUn/z++CHHuX9
 NTJbkB/1LzcZH78uqS2eZM1qV5bp2rS1ZtCveJXbGyqK4rEDKMUMAeLMoEbZJ3E5
 aoXGf+ivM2lqCPhbhaYE4WjdNrHUsClqIDJIFrn/ZtCTz72H6L3gwd8uGjZi5+DM
 5zp8Dm1svo6RHSfj2ifs2CTNNiZr0l7sKqY+3JnfR/Y1JMAZ2u1GOa3kCiTKpqj/
 33bX8MaNYRe+Tgs36bqsQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785919468; x=1786005868; bh=9eCzdPG6Ga/wmSyS4IEiH3tJDkN18k6ylwI
 osi/Rdj8=; b=EW58KS2jJpkEhkz8kUDOyZ1qxe1ggwuCUODnuNvzLOTMiogAGdl
 i9MMcaU3WFpiMvlwVr/Z2fYJx+7tDgPZ7lgZpC5kML73m9OghuG7ws2lGFTaKmr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I60nzrXEPhWvPB5Wcjx3mG0eQzpC9LOLRmv8uCCg5yPZ/nBbigsoq
 yeRxSEF1ZR8WemH20sXGyqWN4yagPTzLndPSPLVrrwdoDn6Ck0ZrP5axxCIqMDfzlVBckL
 /ELPyTE9fp5m7YKUnsaOz6cpV9s7qDrdCTX5dOSZXi2lIGk5jkQakcxIf2OA
X-ME-Proxy: <xmx:7Pdyaq4Yyj4ORX9lcTjCJvz_minpJIwwWBpXKys8cadAiSaieYwrYA>
 <xmx:7PdyapTpi3rl3JjIDKXTvBh8Hgjt0NHa0ScjrZugY_u3VRCqj-F1BA>
 <xmx:7PdyappSCqm0z2i5SNuks3RrL_989va_OG_WU_5j2xYvlt7cCF-wpQ>
 <xmx:7PdyanIappSSfn_508gEA2qK0srw52L0w2ZkPVN-1-qKFvDlf4UpcQ>
 <xmx:7PdyariKbWu4TiF5DH_4Xxu7yGB947d-dhNmnEyxgd231C3rkzfi14tN>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 5 Aug 2026 04:44:28 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id C06737E0ADB; Wed, 05 Aug 2026 09:44:26 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87o6fhg2re.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <87fr0w1rsf.fsf@HIDDEN> <87ecggnvtm.fsf@HIDDEN>
 <87tspbyvx0.fsf@HIDDEN> <87fr0u5dun.fsf@HIDDEN>
 <87o6fhg2re.fsf@HIDDEN>
Date: Wed, 05 Aug 2026 09:44:26 +0100
Message-ID: <87v79p2byt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [04/Aug  9:17pm +03] wrote:
>>> I meant an option to display in-buffer icomplete completions without
>>> typing TAB, i.e. like in the minibuffer.  But this would be a new feature.
>>
>> I think someone who wants that can use some advice.
>
> This feature might require adding post-command-hook.
>
>> Do you think the second-tab behaviour I've implemented is unwanted?
>
> I already tried double TAB when you first mentioned it, but it
> didn't work.  Now I see that the second TAB should follow 'C-M-i',
> i.e. the complete key sequence to pop up the *Completions* buffer is
> 'C-M-i TAB'.  At least this could be mentioned in the documentation.

Right.  I'm assuming that people who want this will set
tab-always-indent to 'complete.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 4 Aug 2026 18:42:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 14:42:39 2026
Received: from localhost ([127.0.0.1]:42680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrK62-0003Gi-Q9
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 14:42:39 -0400
Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]:60980)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wrK61-0003GS-7f
 for 81537 <at> debbugs.gnu.org; Tue, 04 Aug 2026 14:42:37 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org
 [IPv6:2001:67c:2050:b231:465::1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4hF2Tb0z7HzKrrB;
 Tue, 04 Aug 2026 20:42:27 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1785868947;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=Aijs3ZQveUY+UVjlGpOp2tEmhHVjLPjKwjldPot699I=;
 b=whZ2ES6tCft/P6Kg6IYjlLwAZKTLr3rHnYczpqr9kvaxtM+s0bxOa5X24rAVKDyFuQenT7
 KVlxQErj886fEhH/ofX8I4A6qZblsFqugwKmF7k0esXFuwwdap5AQi1vq5OclTabldoLkF
 8fv9KBFZRJ6dBRQVhT5krNf8JNJosgDj0kR/s7I6XkmxMPUhxqy7CJWRWObWgJbgMMcui7
 ZO3uQh8rwueXeS9uiFS5WInKj7fMF7kAjv1GTC0v78q+3B4Cd54IN4nTYBLTouJShvLS1m
 ZQI7bmyuIAVePWUG681ZiKiY09IsvYpUUNPRSmg4b5tpwkF7Dqf2vHymEum+QQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87fr0u5dun.fsf@HIDDEN>
Organization: LINKOV.NET
References: <875x1swzsl.fsf@HIDDEN>
 <87fr0w1rsf.fsf@HIDDEN>
 <87ecggnvtm.fsf@HIDDEN>
 <87tspbyvx0.fsf@HIDDEN>
 <87fr0u5dun.fsf@HIDDEN>
Date: Tue, 04 Aug 2026 21:17:27 +0300
Message-ID: <87o6fhg2re.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4hF2Tb0z7HzKrrB
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> I meant an option to display in-buffer icomplete completions without
>> typing TAB, i.e. like in the minibuffer.  But this would be a new feature.
>
> I think someone who wants that can use some advice.

This feature might require adding post-command-hook.

> Do you think the second-tab behaviour I've implemented is unwanted?

I already tried double TAB when you first mentioned it, but it
didn't work.  Now I see that the second TAB should follow 'C-M-i',
i.e. the complete key sequence to pop up the *Completions* buffer is
'C-M-i TAB'.  At least this could be mentioned in the documentation.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 4 Aug 2026 16:30:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 12:30:46 2026
Received: from localhost ([127.0.0.1]:41610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrI2P-00017i-KO
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 12:30:46 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:44380)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1wrI2N-00017K-NK
 for 81537 <at> debbugs.gnu.org; Tue, 04 Aug 2026 12:30:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1785861043;
 bh=4x5SxeHjfZy2HQsQcp5MNZJ3ZU0iPDt2JKwYK5M6xec=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=fc6HIw7aFqMhLmHnnURVHwTXgGtxLz70rFM67IrUrn8pF9snmcAg0KWplmRADnHNW
 7qxeKnLywOUXxO+ifc4cQMwphdh44oOmnIsOicJ/h9lind+4YpaHJeiLDFNqBb3gIK
 YVx7JlvLaDInsUZMi/AqQgL9cKqKF6qZvZydv40n8tSHobt/nJwjZcd+OoXXUi1JLo
 sDkAQMwwk3kog3qDhBybvLpz7ysCMTLPORoVFWpCWEsL3c0zWGs/nU1MttFuOdAKun
 utEovzKQ/QYI0C3BmsgpGGRKdJuHBzCDc36gR0ZY7F2wMN9JurK44sHMWLGl05Y4Pl
 giIUny99PP/hA==
From: Eshel Yaron <me@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87cxvy5dle.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
 <87cxvy5dle.fsf@HIDDEN>
Date: Tue, 04 Aug 2026 18:30:39 +0200
Message-ID: <87zez1c0gg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Eshel Yaron [04/Aug  7:20am +02] wrote:
[...]
>>> and also invalidate code in people's
>>> initialisation files.  For example, I found while trying things out that
>>> some Icomplete code in my initialization file was relying on the value
>>> of completion-all-sorted-completions in a way that subtly broke once I
>>> tried moving away from the default completion infrastructure.  The code
>>> would surely be fixable, but I wouldn't want to make users do that.
>>
>> Could you share this piece of configuration?
>> It sounds like it might rely on undocumented implementation details, in
>> which case it's OK if it needs some tweaking for new Emacs versions.
>> But it also possible it'll work just as well with the patch below.
>
> I have a command which finishes by adding :after advice to
> icomplete-post-command-hook.  In that advice it does something on the
> condition that (length= completion-all-sorted-completions 1).

Got it.  I wouldn't worry about retaining compatibility with something
like that anyway, since completion-all-sorted-completions is very much
an implementation detail.  But as it happens, I think it should work
also with my patch.

>> Could you please try the following patch?
>> The most important advantage this has over the change you installed is
>> that it doesn't require minibuffer.el to "know" about Icomplete.
>> If this patch doesn't work as expected and we're convinced that using a
>> proper completion-in-region-function is a dead-end, we can still free
>> minibuffer.el from knowledge of Icomplete by adding a frontend-agnostic
>> hook in minibuffer.el that Icomplete would leverage.
>> But let's see if we can get by with the existing API first...
>>
>> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
>> index c8da0e9bf9b..7b7d10f96fc 100644
>> --- a/lisp/icomplete.el
>> +++ b/lisp/icomplete.el
>> @@ -537,6 +537,39 @@ fido-mode
>>      (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
>>      (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))
>>
>> +(defun icomplete-in-buffer-force-complete-and-exit ()
>> +  (interactive "" icomplete-in-buffer-mode)
>> +  (minibuffer-force-complete
>> +   (icomplete--field-beg) (icomplete--field-end) 'dont-cycle)
>> +  (icomplete-in-buffer-mode -1))
>> +
>> +(defun icomplete-in-buffer-abort ()
>> +  (interactive "" icomplete-in-buffer-mode)
>> +  (icomplete-in-buffer-mode -1)
>> +  (keyboard-quit))
>
> This part of your patch is what worries me the most.  We have had very
> long discussions about getting the several different exiting functions
> *just* right, over the years.  I'm loathe to add more subtly different
> ones.

Is there some documentation of that "just right" behavior?
Or specific things you notice that aren't just right?

> Also, there are some subtle behaviours encoded in what I added to
> minibuffer.el a few days ago, too, about typing tab twice.  In your
> patch I think those would get lost.

If it has to do with the *Completions* buffer/window, then it would
surely be lost with my patch, because the idea is exactly to divorce
icomplete-in-buffer from the default completion frontend.
But if that behavior is desirable, it can probably be added back quite
easily by binding TAB in icomplete-in-buffer-mode-map.

> I'd like to see your proposal for adding a hook but I may have similar
> trepidation about installing it ...

It's just a mechanical change: rename completion--icomplete-in-buffer-p
to completion--FOO (where FOO doesn't include "icomplete", or any other
frontend name), and replace its Icomplete-specific body with:

  (run-hook-with-args-until-success completion-FOO-functions)

Then, in icomplete-mode, add the current
completion--icomplete-in-buffer-p to completion-FOO-functions.
That should preserve the exact behavior of the existing code, and so
hopefully avoid that trepidation. :)


Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 4 Aug 2026 11:28:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 07:28:55 2026
Received: from localhost ([127.0.0.1]:37499 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrDKJ-0000Vw-2j
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 07:28:55 -0400
Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]:50173)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrDKG-0000Vh-JR
 for 81537 <at> debbugs.gnu.org; Tue, 04 Aug 2026 07:28:53 -0400
Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 251907A0155;
 Tue,  4 Aug 2026 07:28:47 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-01.internal (MEProxy); Tue, 04 Aug 2026 07:28:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm1; t=1785842927; x=
 1785929327; bh=sltZpabLtbkolRkNnsreqtzTQtEqJ+w77aGTvimIx80=; b=t
 H5IcxGAYIk940zA9bHi8S2JAalRXW+VMGCmRqhNWezxr5wmLSWHtxoeU8np+phIo
 as+tvWepmoZ516GuGIocm5wCo24TQBG6R0Pe1va8iML3OIieKCqNnwZfukQsUtyE
 UeNzet6/OmqJPFSEVR9359J5agli99k02FVR9Ta7t+yvohWZoedqIjNeLzEaXvGV
 ArahbElDOjF6UfaR7uKhC08s0gqh4TQ6S3J74fpFfkeuhZbZ/5RSp53QteOOmebM
 x4aX7Tx3fdQJ2fE1CGNY7LUZYNvaoWmaZXMTTOoQyV2pBdtOgHgIP9BXhtyvf0/7
 hJOOjfyt0t9ntrOJEYfrg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785842927; x=1785929327; bh=sltZpabLtbkolRkNnsreqtzTQtEqJ+w77aG
 TvimIx80=; b=B4+ACOQK+e53Im9otCHzoZtp6lzHCWr8//jJdLMTslK22rx7uxm
 NCzYKBMi6qRU6tsYTufXxMjWy6oFjdqL2S/anmoEY27xVNhLUzIXkf1f+e4oflGa
 cSQxxg/eWlC8fm8UMbOUU7M+X5v3NnhHMDA12DJwDoG6tCE7dRfXNb9qhN8a6KsO
 W6Y6tlIBl4vb2kKZT0zREqu9AwryoAt+xi2bA766wjr1yfPKkZ9E3cZvPi8oYds5
 j+gCl4ySt/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L67/iJ78F/Bcqn3htw1F0FEw
X-ME-Proxy: <xmx:7sxxangJT4SabDW0PzxGOyCIAm8B0EKX0pP3ntb9XuPbMTPtM5Oy9A>
 <xmx:7sxxapbrs6rWaYm80Ik2K7X4v9QrCDgdhO5j7sl5QiMDreC_XZgmmA>
 <xmx:7sxxanT5uLGCfI52KsADNHwzoCQ37Viq2wYrTtcj7boVKaOf4rnu9Q>
 <xmx:7sxxakQB4w0tL2TqEww4f6m6LrXgXmwI1bNEHmmOjGu7jfSpPSRteg>
 <xmx:78xxarpeZBktusdgRXF-hhp7eNk-UbhkQh0WCtdOm-llPttJX7_IJd1N>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 4 Aug 2026 07:28:46 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 90ACF7E6127; Tue, 04 Aug 2026 12:28:45 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Eshel Yaron <me@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <8733wulawq.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <8733wulawq.fsf@HIDDEN>
Date: Tue, 04 Aug 2026 12:28:45 +0100
Message-ID: <87cxvy5dle.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eshel Yaron [04/Aug  7:20am +02] wrote:
> I took a shot at modifying Icomplete to install a proper
> completion-in-region-function, and I think the results aren't that bad.
> It completely and cleanly detaches icomplete-in-buffer from the default
> *Completions* buffer, which I think is a good thing.  See patch below;
> it's supposed to affect only the in-buffer case, not the primary
> minibuffer case.

Thanks.  The insight you had, that I didn't, is to not try to rewrite
icomplete--in-region-setup, but just move it to a different place.

>> and also invalidate code in people's
>> initialisation files.  For example, I found while trying things out that
>> some Icomplete code in my initialization file was relying on the value
>> of completion-all-sorted-completions in a way that subtly broke once I
>> tried moving away from the default completion infrastructure.  The code
>> would surely be fixable, but I wouldn't want to make users do that.
>
> Could you share this piece of configuration?
> It sounds like it might rely on undocumented implementation details, in
> which case it's OK if it needs some tweaking for new Emacs versions.
> But it also possible it'll work just as well with the patch below.

I have a command which finishes by adding :after advice to
icomplete-post-command-hook.  In that advice it does something on the
condition that (length= completion-all-sorted-completions 1).

> Could you please try the following patch?
> The most important advantage this has over the change you installed is
> that it doesn't require minibuffer.el to "know" about Icomplete.
> If this patch doesn't work as expected and we're convinced that using a
> proper completion-in-region-function is a dead-end, we can still free
> minibuffer.el from knowledge of Icomplete by adding a frontend-agnostic
> hook in minibuffer.el that Icomplete would leverage.
> But let's see if we can get by with the existing API first...
>
> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
> index c8da0e9bf9b..7b7d10f96fc 100644
> --- a/lisp/icomplete.el
> +++ b/lisp/icomplete.el
> @@ -537,6 +537,39 @@ fido-mode
>      (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
>      (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))
>
> +(defun icomplete-in-buffer-force-complete-and-exit ()
> +  (interactive "" icomplete-in-buffer-mode)
> +  (minibuffer-force-complete
> +   (icomplete--field-beg) (icomplete--field-end) 'dont-cycle)
> +  (icomplete-in-buffer-mode -1))
> +
> +(defun icomplete-in-buffer-abort ()
> +  (interactive "" icomplete-in-buffer-mode)
> +  (icomplete-in-buffer-mode -1)
> +  (keyboard-quit))

This part of your patch is what worries me the most.  We have had very
long discussions about getting the several different exiting functions
*just* right, over the years.  I'm loathe to add more subtly different
ones.

Also, there are some subtle behaviours encoded in what I added to
minibuffer.el a few days ago, too, about typing tab twice.  In your
patch I think those would get lost.

I'd like to see your proposal for adding a hook but I may have similar
trepidation about installing it ...

Sometimes you just have to grandfather things in.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 4 Aug 2026 11:23:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 07:23:22 2026
Received: from localhost ([127.0.0.1]:37482 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrDEv-0000Gk-Rv
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 07:23:22 -0400
Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]:58641)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrDEt-0000GF-L0
 for 81537 <at> debbugs.gnu.org; Tue, 04 Aug 2026 07:23:20 -0400
Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 02E487A006C;
 Tue,  4 Aug 2026 07:23:13 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-06.internal (MEProxy); Tue, 04 Aug 2026 07:23:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm1; t=1785842593; x=
 1785928993; bh=kxQpAWY912LJAhS+vZi6/uxRlxvu0Pi7IWh2wsPWeVM=; b=H
 asLa6zwi1lYxhk3PNeQL48pRtdeAQnO6tv1NeVcyTmT/m3YS8y9HvuzP7wsSOOO5
 L14Ni11VjTVK2MeQvpIk8EsqUGJTyVjoN0C/0hNgUP1xgcLH2oN9hzh+LltplnPu
 FMZhMo2i6KtHFMGRUlthNj0eeEsGrG2/VhbxUrBz9ZqeQIvveVWCDDbKJ37rI4YS
 Xl5NwsUsLQ5pCaa467pvB2ViHeG0HR4swzyYUsjyVus+AZp6+GW0qdwA0QvfoXMU
 ECvFI2ni9DmmIwCkVFmQD/Ot32CsIchG5RcNF8LhEbxTVUoBCPsDLlK7wnMnzHN/
 SS8t4bWfft0M7Bng55bQA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785842593; x=1785928993; bh=kxQpAWY912LJAhS+vZi6/uxRlxvu0Pi7IWh
 2wsPWeVM=; b=K3LHIwLQdDjCg6xsGDduovSwzGIGHnIYk+ixGmrna++/qnyl4zX
 V010s6l+EaOH/MByBPiZp47tIV8S3xVG95j6o/vHKQlwKzVs+hA2/8hopbO9PSDB
 tqrP+Mi8R+T6Ho4400EMZt+E13wBW5GrUAClU8ubgJmf0sfrBqvimT9rjiVVSjFw
 L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CHWzJQSmTuuxKX8lH9Ckji39P12It
 XULK9iyhC+L2fveO9NqU3nz2Ha9tFznl19Aljz0RyG6671+Ek9uLEd53OAow
X-ME-Proxy: <xmx:octxauo9wer8RVnOUS7sl3d-7coFbh7ITAxPglHJhbiBuT9FgmG6Nw>
 <xmx:octxaiCsihl8Y-PEzcSeAk6r3GDsMg6s5Nq0cPCDrUPxhJx92RcwSw>
 <xmx:octxajbwXP8wNntF7BxVBLDWmRQH5NzftOg7NYlhjED9bwjFw7S21w>
 <xmx:octxat5dPSMp6o9aDS-qUTL_exge7NSrt9pDkAn39K815MGgOlcZmg>
 <xmx:octxakS5H9ljo9WbR9g40mYEnCe0szv6hXwWR18Cntu-a_5pqam9oUSU>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 4 Aug 2026 07:23:13 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 18CBC7E52D9; Tue, 04 Aug 2026 12:23:12 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87tspbyvx0.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <87fr0w1rsf.fsf@HIDDEN> <87ecggnvtm.fsf@HIDDEN>
 <87tspbyvx0.fsf@HIDDEN>
Date: Tue, 04 Aug 2026 12:23:12 +0100
Message-ID: <87fr0u5dun.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [03/Aug  8:07pm +03] wrote:
>>> Shouldn't the UI of icomplete-in-buffer be the same as the UI
>>> of icomplete in the minibuffer?  That is, only when the user
>>> types TAB, it should display the *Completions* buffer,
>>> either in the minibuffer or in the regular buffer.
>>> But otherwise on typing characters it should display inline
>>> candidates immediately, without requiring to type TAB,
>>> i.e. something like 'completion-preview-mode' already does.
>>
>> Do you mean after the *second* tab?  I think the first should definitely
>> only display the inline candidates.
>
> I meant an option to display in-buffer icomplete completions without
> typing TAB, i.e. like in the minibuffer.  But this would be a new feature.

I think someone who wants that can use some advice.

Do you think the second-tab behaviour I've implemented is unwanted?

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 4 Aug 2026 11:22:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 07:22:53 2026
Received: from localhost ([127.0.0.1]:37476 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wrDET-0000F1-AI
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 07:22:53 -0400
Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]:55529)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wrDES-0000Ek-8v
 for 81537 <at> debbugs.gnu.org; Tue, 04 Aug 2026 07:22:52 -0400
Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50])
 by mailfhigh.stl.internal (Postfix) with ESMTP id BEBB87A00C6;
 Tue,  4 Aug 2026 07:22:46 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-10.internal (MEProxy); Tue, 04 Aug 2026 07:22:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm1; t=1785842566; x=
 1785928966; bh=AROh3WfxLwcTBqzxPA+MitXxkJpaxZc2P6pcWscn4fc=; b=h
 kn6KQYGte4djCy3IlFfKangf9F1pYoLIfzSaI7Zdrrd+weAvUkKUjavIwv6F1SBG
 Ba0vBsiAz+7oz+l/ZQB0jO9SLIBOjcNKL+x9FbvrkVcA1ibJnM3m4MbwxOhJpcKu
 yzFW/qF7cTgX31TO1/YVQ36E6TmqSZrv+9aZSDi4kO1/kGDnxdQhSTAZ43OhHgsh
 jfO+8MzasKR8txXImnCwQQhr8kf8Hpb4WwCo25UfCv3mE/nDik/mQyKyh4Dm45UR
 Lx3jA8V0yy5WVTbqH6FXrTVLjpiSt2ccQ2BQY86ctOYEW3EEDrfJfkfvhHqRfdYm
 NRC5/CWLGw/cx/qDED1lQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785842566; x=1785928966; bh=A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7baQc1H4nmEC5ALfxJaYDfyW+yqlBqqriRBEXceHCqYfMHwzqcL7OCdmb
 47RUeqeo+CupDdfCpylPQTssCLX40HiFjZktYWPfpiN/54SU2eS9Vavre2PLbIlDwzD+JK
 O39wiZWk1u+NZa4XGnxDe/4ypa1hu2YRnqXg5hzHwJW8Z9dszJIjhdkNbvNVA3thMuMGqt
 J06iQe3JBhdB79DS7uIJsm2/Lof1JyVQR10TbeUjcjBoZCRBnL20wL3pBQ51+yZKx56WPn
 lUVYbFjGZS9X9Rw/8Wie+CPk10LssQZ/5mtXSDR/WuLuoNzEaqCebgrmat2A
X-ME-Proxy: <xmx:hstxamsb9Ds1e87A49qdsQogJeSmJXfB5cbAseOqpvSvN5xuEw9_mw>
 <xmx:hstxag3iIHA7zdhu7KeXRMJtIlYkDvgDspvaw44ygi9_LR3jLPAqSw>
 <xmx:hstxah_UQA4T_ocA5-n9pU20nvY-BO0WaJefBz3yGsYxj86kj7KgYg>
 <xmx:hstxahO-1GFQ2-yA6_iMXB6ogrmJN9M2NKLtUG3p7kcZgfnwGfrxjA>
 <xmx:hstxajEkevJl1J8x54ZdPcjCD6OfN6hb6srcvpAA8eej7EDT8O9aQDeV>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 4 Aug 2026 07:22:45 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 1A0FC7E52D9; Tue, 04 Aug 2026 12:22:45 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <875x1r16cr.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <87jyq8ojx2.fsf@HIDDEN> <875x1r16cr.fsf@HIDDEN>
Date: Tue, 04 Aug 2026 12:22:44 +0100
Message-ID: <87ik5q5dvf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [03/Aug  8:06pm +03] wrote:
>>  (defcustom icomplete-in-buffer nil
>>    "If non-nil, use Icomplete when completing in buffers other than minibuffer.
>>  This affects commands like `completion-in-region', but not commands
>> -that use their own completions setup.
>> -
>> -If you would prefer to see only Icomplete's in-buffer display, but do
>> -not want the \"*Completions*\" buffer to pop up in those cases, add
>> -this advice to your init file:
>
> Now we need to replace this with a suggestion how to do the opposite
> for users who want the *Completions* buffer to pop up after TAB.

I don't think this is essential, and if we add it, it should only be in
NEWS.  Happy if you want to add it.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.
bug No longer marked as fixed in versions 32.1 and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 4 Aug 2026 05:20:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 04 01:20:15 2026
Received: from localhost ([127.0.0.1]:35142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wr7ZW-00017F-HI
	for submit <at> debbugs.gnu.org; Tue, 04 Aug 2026 01:20:15 -0400
Received: from mail.eshelyaron.com ([107.175.124.16]:45106)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <me@HIDDEN>)
 id 1wr7ZU-000172-77; Tue, 04 Aug 2026 01:20:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1785820811;
 bh=PdY4wKUAJQqfrME+8yo9kQ4hMY+oYExtSvV24HQnAQU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=R9uqQ5T1wL+7NB1+ETSBXjyWf5oZ2KaWgiUNLtinuBvXnLxDdhH8ty+gJo+SwOWs0
 /PjaOEJby4AUECc/Ln8i3KAFGK1IhWQA+eEEtBdROdXQOYs1Cf4QoKlTRbctUkge/Y
 ngvgbrFH26lYJN+/DX8SxPRmKQpPSzd2QPSX5IcDDUHOy6yquatPZ7qZhu8sbjDjyJ
 BC1dKgOi0EQ4Zjgd+cip13mQFSeubextbJaitQ5Cab1CSzjkZKGezwpaJFc3bNNwim
 Z1YEMtigkaITRG8Kz+vdVVLSbNo8TSzNJJKi7uzp03iCniZsZ5GWcZbxylUGQrrmLK
 JYrz+mbGlLucA==
From: Eshel Yaron <me@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <875x1swzsl.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
Date: Tue, 04 Aug 2026 07:20:05 +0200
Message-ID: <8733wulawq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

reopen 81537
quit

Hi,

Sean Whitton <spwhitton@HIDDEN> writes:

> We've discussed this before and Eshel and Juri suggested that the thing
> to do is make icomplete-in-buffer a proper completion-in-region-function
> value, instead of hanging off the default completion infrastructure as
> it does now.

Right.

> I've been looking into this over the weekend and I think that it would
> not be a good idea to try to do that.  Icomplete is heavily dependent on
> the default completion process in a couple of senses:
> - it relies on various completion- and completion-- functions and
>   variables, and some of the state changes
> - in its primary mode, in the minibuffer, it is architected as a pure
>   supplement to the default completion, instead of a whole completions
>   interface of its own.

I took a shot at modifying Icomplete to install a proper
completion-in-region-function, and I think the results aren't that bad.
It completely and cleanly detaches icomplete-in-buffer from the default
*Completions* buffer, which I think is a good thing.  See patch below;
it's supposed to affect only the in-buffer case, not the primary
minibuffer case.

> So, if we were to try to rearchitect Icomplete to work as a bona fide
> completion-in-region-function, we would likely break various subtle
> behavioural tweaks that have gone into Icomplete over the years that
> make it work as well as it does,

I'm not an Icomplete user, so it's definitely possible that I've missed
some subtlety, but my few tests didn't reveal such breakage.

> and also invalidate code in people's
> initialisation files.  For example, I found while trying things out that
> some Icomplete code in my initialization file was relying on the value
> of completion-all-sorted-completions in a way that subtly broke once I
> tried moving away from the default completion infrastructure.  The code
> would surely be fixable, but I wouldn't want to make users do that.

Could you share this piece of configuration?
It sounds like it might rely on undocumented implementation details, in
which case it's OK if it needs some tweaking for new Emacs versions.
But it also possible it'll work just as well with the patch below.

> I haven't got much experience in this area so perhaps the above contains
> some misconceptions.  Let me know how it seems to you all.
> Otherwise, I propose the following patch for master.

Could you please try the following patch?
The most important advantage this has over the change you installed is
that it doesn't require minibuffer.el to "know" about Icomplete.
If this patch doesn't work as expected and we're convinced that using a
proper completion-in-region-function is a dead-end, we can still free
minibuffer.el from knowledge of Icomplete by adding a frontend-agnostic
hook in minibuffer.el that Icomplete would leverage.
But let's see if we can get by with the existing API first...

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index c8da0e9bf9b..7b7d10f96fc 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -537,6 +537,39 @@ fido-mode
     (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
     (add-hook 'minibuffer-setup-hook #'icomplete--fido-mode-setup)))
 
+(defun icomplete-in-buffer-force-complete-and-exit ()
+  (interactive "" icomplete-in-buffer-mode)
+  (minibuffer-force-complete
+   (icomplete--field-beg) (icomplete--field-end) 'dont-cycle)
+  (icomplete-in-buffer-mode -1))
+
+(defun icomplete-in-buffer-abort ()
+  (interactive "" icomplete-in-buffer-mode)
+  (icomplete-in-buffer-mode -1)
+  (keyboard-quit))
+
+(defvar-keymap icomplete-in-buffer-mode-map
+  :doc "Keymap used by Icomplete during in-buffer completion."
+  :parent icomplete-minibuffer-map
+  "C-j" #'icomplete-in-buffer-force-complete-and-exit
+  "C-g" #'icomplete-in-buffer-abort)
+
+(define-minor-mode icomplete-in-buffer-mode
+  "Minor mode that is enabled during Icomplete in-buffer completion."
+  :interactive nil
+  (if icomplete-in-buffer-mode
+      (add-hook 'post-command-hook #'icomplete-post-command-hook nil t)
+    (remove-hook 'post-command-hook #'icomplete-post-command-hook t)
+    (delete-overlay icomplete-overlay)))
+
+(defvar completion-in-region--data)
+
+(defun icomplete--in-region (beg end col prd)
+  (setq completion-in-region--data
+	`(,(if (markerp beg) beg (copy-marker beg))
+          ,(copy-marker end t) ,col ,prd))
+  (icomplete-in-buffer-mode 1))
+
 ;;;_ > icomplete-mode (&optional prefix)
 ;;;###autoload
 (define-minor-mode icomplete-mode
@@ -556,11 +589,11 @@ icomplete-mode
 \\{icomplete-minibuffer-map}"
   :global t
   (remove-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)
-  (remove-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup)
+  (remove-function completion-in-region-function #'icomplete--in-region)
   (when icomplete-mode
     (fido-mode -1)
     (when icomplete-in-buffer
-      (add-hook 'completion-in-region-mode-hook #'icomplete--in-region-setup))
+      (add-function :override completion-in-region-function #'icomplete--in-region))
     (add-hook 'minibuffer-setup-hook #'icomplete-minibuffer-setup)))
 
 (defun icomplete--completion-table ()



Best,

Eshel




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 3 Aug 2026 17:12:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 03 13:12:58 2026
Received: from localhost ([127.0.0.1]:57917 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqwDh-0002VW-I2
	for submit <at> debbugs.gnu.org; Mon, 03 Aug 2026 13:12:57 -0400
Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:42146)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wqwDb-0002Ua-QC
 for 81537 <at> debbugs.gnu.org; Mon, 03 Aug 2026 13:12:52 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4hDNXX4bzWzMlHb;
 Mon, 03 Aug 2026 19:12:44 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1785777164;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=Hyb7uuYhpwcXtKRVkxd4126xEJPdLgg2LiVXH3JeikQ=;
 b=o9mdUvxfkKIqFP8JaiIFY0rVMKxmEJc8vP+e63A4eUM1HT8RLW4L//ePwZ4/62OI9b/LFU
 TPA8ktMULMF4Izp2wBgG7LLZlgNiPJtaVAcIGX5o0tEH5xg5H69wGqfv+alMw2+NbZUH5H
 eDsyIhDNwUEyalFgpvkXus9ZEE0Dceh3O3ao6wiOdK4rQwC70ep7gd2lOwNslPCaupxF/m
 yRR2J26663FGrYqT/SpT+o5yLJobbjFHFHlwzapltVhdagFfxwKE3b2OwOZvJHcJTvuosT
 NV07aw8zKrUjMLQdBMtseAXUDPKKkhWf7ilgna5kHHvNBtGlDGBRkvVLR4D1sw==
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87ecggnvtm.fsf@HIDDEN>
Organization: LINKOV.NET
References: <875x1swzsl.fsf@HIDDEN>
 <87fr0w1rsf.fsf@HIDDEN>
 <87ecggnvtm.fsf@HIDDEN>
Date: Mon, 03 Aug 2026 20:07:55 +0300
Message-ID: <87tspbyvx0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Shouldn't the UI of icomplete-in-buffer be the same as the UI
>> of icomplete in the minibuffer?  That is, only when the user
>> types TAB, it should display the *Completions* buffer,
>> either in the minibuffer or in the regular buffer.
>> But otherwise on typing characters it should display inline
>> candidates immediately, without requiring to type TAB,
>> i.e. something like 'completion-preview-mode' already does.
>
> Do you mean after the *second* tab?  I think the first should definitely
> only display the inline candidates.

I meant an option to display in-buffer icomplete completions without
typing TAB, i.e. like in the minibuffer.  But this would be a new feature.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 3 Aug 2026 17:12:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 03 13:12:52 2026
Received: from localhost ([127.0.0.1]:57915 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqwDc-0002V5-0m
	for submit <at> debbugs.gnu.org; Mon, 03 Aug 2026 13:12:52 -0400
Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:42134)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wqwDZ-0002UW-2w
 for 81537 <at> debbugs.gnu.org; Mon, 03 Aug 2026 13:12:49 -0400
Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4hDNXT6hw8zMlGC;
 Mon, 03 Aug 2026 19:12:41 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1785777161;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=US9NNGOjwzvzBvnRp+P5D8zlj67T/17IFOOIHTij09o=;
 b=Q2w6mjgcr8RvZ2+DRWypOCd61YftUyRWLEf3ikYSr1fua9GiMeqZ5qPgjUQJeekPStvSAM
 W/QRML/Icxo951CBx1PGekc+ZtJPPfq9S+PrT2m6Ft8JNYNLAwPghvCZWqh9WsNfdgXN8Z
 iS+oiTavTxTJeD4Umcxwely3gD/vHm7bFWSMVg+qXRv5l1M3yeQTmrDD1RAyo7YtPVtwgb
 MkY7C3Y72Ud5OFWVTlTe9Z9ybDJ3fZIPO2C9sVGs3645K/brq3dO2c8EvfcYXWWPuWoHgx
 +JXP/eNDtvRmwsay4Zx550APMac9AeCFlS6Hkdho0eYfvsYpJx9+GnI3JVhDKw==
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87jyq8ojx2.fsf@HIDDEN>
Organization: LINKOV.NET
References: <875x1swzsl.fsf@HIDDEN>
 <87jyq8ojx2.fsf@HIDDEN>
Date: Mon, 03 Aug 2026 20:06:28 +0300
Message-ID: <875x1r16cr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>  (defcustom icomplete-in-buffer nil
>    "If non-nil, use Icomplete when completing in buffers other than minibuffer.
>  This affects commands like `completion-in-region', but not commands
> -that use their own completions setup.
> -
> -If you would prefer to see only Icomplete's in-buffer display, but do
> -not want the \"*Completions*\" buffer to pop up in those cases, add
> -this advice to your init file:

Now we need to replace this with a suggestion how to do the opposite
for users who want the *Completions* buffer to pop up after TAB.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537-done <at> debbugs.gnu.org:


Received: (at 81537-done) by debbugs.gnu.org; 3 Aug 2026 10:51:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 03 06:51:08 2026
Received: from localhost ([127.0.0.1]:54185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqqGC-0000S8-11
	for submit <at> debbugs.gnu.org; Mon, 03 Aug 2026 06:51:08 -0400
Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]:59681)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wqqG8-0000RU-JN
 for 81537-done <at> debbugs.gnu.org; Mon, 03 Aug 2026 06:51:05 -0400
Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 5A31814000E9;
 Mon,  3 Aug 2026 06:50:59 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-06.internal (MEProxy); Mon, 03 Aug 2026 06:50:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm1; t=1785754259; x=
 1785840659; bh=ydwfN0LXMTKUbfiFLEF+EkOpN+plffjgMVGP23qchMU=; b=k
 uZ3m6amWLclJwQjNdl64d9uWpA4IrtkRv4M22HpHmwbzwvgm7d5MsSrcMh/IAtzu
 wrjeyGTycnfHXsLSThUiyWZunbhglRtD+Gi/s3knC4o6TqyzKeHSY+dg+0FovSX6
 oUxNs0kd6/j6ripnGjUt3QIEgmRy2oIWmGwrUMCSIoe8RgUETJ0qtzsne9/aNJ6a
 nNxfwuNPuKwWvKmpBnzS8iYVJiqv+7biRAfwHfaGDU5g+sxEDcQ8cxeCg0TqT7yC
 Pw2C+f5QU/YAiWvkzVa3NkrPWx0yL/Yg8ccdINAOV+JbqDkwLmrWZ5wy+eF/URXn
 UZ9NyLTDs/XgNekPWqcLw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785754259; x=1785840659; bh=ydwfN0LXMTKUbfiFLEF+EkOpN+plffjgMVG
 P23qchMU=; b=hiiajX7uUlSijOL9MGSksrdO4uWhJd7hTlVA5ZIGupkCTAqAdqh
 IDRMDwWnsiFkZFyuAvZnieD4nBJf+MbkZ5rHbTzE75Nxpc8cyYz9AyVPa/oW9bMW
 ZFOkoGGe3KyshN5wNGzs7ot3NxSbUSC0VMNBcPRKJApAgU0XrqIDShsMZrPiyLW6
 daxw5DXcewUfs4kG1XqN61SB4pm5hXTw7lE7m4ayfw888Vj6V57IDn0xMcGBf+jH
 thZJivkYfPF0tPK1Pm3sQHrX/y3Tg2SerFZwsYUHMyrDoPO66lRYqStQRmBz2pUG
 R+zOhSj2YtI/IzgRmSmbIlzkxc1epLGyX1w==
X-ME-Sender: <xms:k3JwaiMt2VBSAFo48XyGsGED7IOOGqz5J-I8cFYyooTn1-GCH5NrqQ>
 <xme:k3Jwauy3aVqJvEaN2AxUV33YiquhztFrbzyyRLT0JE3kDZruBMq9HW0sTs1ZZm8Fm
 Yn9sFJHz1UOq6c2LKMpMefX_oSQYoZbNHYLeg5XGxigQY7PR2XcWDv1>
X-ME-Received: <xmr:k3JwajuNEl3sAkyfL-wpf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7WhEjtEeBeouon3rt2S2kYN6kveEIa>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 3 Aug 2026 06:50:58 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 093E57EA348; Mon, 03 Aug 2026 11:50:58 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87fr0w1rsf.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <87fr0w1rsf.fsf@HIDDEN>
Date: Mon, 03 Aug 2026 11:50:58 +0100
Message-ID: <87cxvz4gvh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537-done
Cc: me@HIDDEN, 81537-done <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Version: 32.1

Juri Linkov [02/Aug  6:16pm +03] wrote:
>> We've discussed this before and Eshel and Juri suggested that the thing
>> to do is make icomplete-in-buffer a proper completion-in-region-function
>> value, instead of hanging off the default completion infrastructure as
>> it does now.
>
> Shouldn't the UI of icomplete-in-buffer be the same as the UI
> of icomplete in the minibuffer?  That is, only when the user
> types TAB, it should display the *Completions* buffer,
> either in the minibuffer or in the regular buffer.
> But otherwise on typing characters it should display inline
> candidates immediately, without requiring to type TAB,
> i.e. something like 'completion-preview-mode' already does.

I think I've figured out an implementation of this.
Installed and closing, thanks both.

--
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 7ef6f1383ab..24156ded8b3 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1581,6 +1581,9 @@ completion--in-boundaries-p
          (end (+ (length string) (cdr boundaries))))
     (>= start pos end)))
 
+(defun completion--icomplete-in-buffer-p ()
+  (eq (bound-and-true-p icomplete--in-region-buffer) (current-buffer)))
+
 (defun completion--do-completion (beg end &optional
                                       try-completion-function expect-exact)
   "Do the completion and return a summary of what happened.
@@ -1686,6 +1689,7 @@ completion--do-completion
               (minibuffer-force-complete beg end))
              ((or completed only-changed-boundaries)
               (cond
+               ((completion--icomplete-in-buffer-p)) ; Bug#81537.
                ((pcase completion-auto-help
                   ('visible (minibuffer--completions-visible))
                   ('always t))
@@ -1699,14 +1703,16 @@ completion--do-completion
                                           'exact 'unknown))))))
              ;; Show the completion table, if requested.
              ((not exact)
-	      (if (pcase completion-auto-help
-                    ('lazy (eq this-command last-command))
-                    (_ completion-auto-help))
+	      (if (if (or (eq completion-auto-help 'lazy)
+                          (completion--icomplete-in-buffer-p)) ; Bug#81537.
+                      (eq this-command last-command)
+                    completion-auto-help)
                   (minibuffer-completion-help beg end)
                 (completion--message "Next char not unique")))
              ;; If the last exact completion and this one were the same, it
              ;; means we've already given a "Complete, but not unique" message
-             ;; and the user's hit TAB again, so now we give him help.
+             ;; and the user's hit TAB again, so now we give him help
+             ;; (even if `completion--icomplete-in-buffer-p' is non-nil).
              (t
               (when (and (eq this-command last-command) completion-auto-help)
                 (minibuffer-completion-help beg end))
@@ -1774,12 +1780,18 @@ completion--in-region-1
    (t (prog1 (pcase (completion--do-completion beg end)
                (#b000 nil)
                (_     t))
-        (if (window-live-p minibuffer-scroll-window)
-            (and (eq completion-auto-select t)
-                 (eq t (frame-visible-p (window-frame minibuffer-scroll-window)))
-                 ;; When the completion list window was displayed, select it.
-                 (switch-to-completions))
-          (completion-in-region-mode -1))))))
+        ;; FIXME: This part of the fix for bug#81537 reintroduces
+        ;; bug#67001 for `icomplete-in-region' users.  It's not as bad
+        ;; for them because Icomplete users probably expect to have to
+        ;; C-g out of completion before using other bindings, but maybe
+        ;; we can still fix it.  --spwhitton
+        (unless (completion--icomplete-in-buffer-p)
+          (if (window-live-p minibuffer-scroll-window)
+              (and (eq completion-auto-select t)
+                   (eq t (frame-visible-p (window-frame minibuffer-scroll-window)))
+                   ;; When the completion list window was displayed, select it.
+                   (switch-to-completions))
+            (completion-in-region-mode -1)))))))
 
 (defun completion--cache-all-sorted-completions (beg end comps)
   (add-hook 'after-change-functions
-- 
Sean Whitton




Notification sent to Sean Whitton <spwhitton@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Sean Whitton <spwhitton@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 2 Aug 2026 19:53:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 02 15:53:21 2026
Received: from localhost ([127.0.0.1]:47153 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqcFM-0000ul-Lu
	for submit <at> debbugs.gnu.org; Sun, 02 Aug 2026 15:53:21 -0400
Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]:56757)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wqcFJ-0000uS-PS
 for 81537 <at> debbugs.gnu.org; Sun, 02 Aug 2026 15:53:19 -0400
Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 353D91400053;
 Sun,  2 Aug 2026 15:53:12 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-08.internal (MEProxy); Sun, 02 Aug 2026 15:53:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm1; t=1785700392; x=
 1785786792; bh=WhIIhkC8uf0jHJCmXlRUoaZJDSh8YcbqSyAgxuydL4A=; b=Z
 xIsPD+vuD8pnQvkvyNo7i/1PSG/TAGkrsSjpGVOqpr0U6ZIQpm0fLB/E8BMfD5xA
 pmA5mkmaNtdHt/JeZv8Q91nS6tA0Gz7lTjqd6frDsaQuDQH4prP4mV4FIW1QpOiv
 xurMX9skxdpkxCkdxjUS1A6LWCz70ldhgOGXvDMgRmsKYBXhhqVHU0niHawHZvKe
 XT8bos+ak58i5xyfUR6F3Fs6lM5C5VJYQY1VbsZ3fy2XQN7D7Pqcy4LjO+SoXov5
 GQoZ+2utNLcOwIvi9lwj8VlW2youV2FzTc8p7fzjTM+SH5JoljT0RPLZLfJEnxfX
 a2ZYMg7HkPODzpFqyxVug==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785700392; x=1785786792; bh=WhIIhkC8uf0jHJCmXlRUoaZJDSh8YcbqSyA
 gxuydL4A=; b=Lo+kTitv98lkbW1LODXCQOV9/+wo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Zkg9/OWIVe4gV0BhPxH8SZUWNJnVzZLRJVYb8/0eeUI+D3gACrUlQGRV7VjPJTpuAWcaI6
 U816K3rOmfFerusLXZmWMeLdi6PkaBFf+GDBKlQ2QIm8Bgop+zGCQmSXPlp2ZvgIhJg0+z
 zFO5k72/EzUcYinn5y3q2e3UHCDOtUze4ohXPtR1Uy6sFQBOD+l6pVrwvs+F93L3RLSghk
 9NGn492pUwyGbS4bJv/jl4cWpOeGA+OvjGsRBXMxt6k5z9OGUKHq5oRdPmOA
X-ME-Proxy: <xmx:J6BvaiuWrW4Hq2dIPs8zNFp37mQWfbBd6n6L9ODqo6vmb462dV7hiw>
 <xmx:J6Bvas2lYlZiq8LvZueiORh5GGOAYiL0LtpiOVPbagwhuGUt-TXtNA>
 <xmx:J6Bvat-sHyMqsfGr5xgcNOIN1YIMYNgOEY_JKqii1LDBrQ-sPm-Kgg>
 <xmx:J6BvatOHc8wJKWJoCQgjWMwDpeH0E1ODyhk6lpsReGjuMLO8OKehZw>
 <xmx:KKBvavGnhSpgdrhy6XS9xfa4h3sA4f7d9KbLeFBiB06guTt1UphhFMnz>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 2 Aug 2026 15:53:11 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 342EB94065B; Sun, 02 Aug 2026 20:53:09 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <87fr0w1rsf.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
 <87fr0w1rsf.fsf@HIDDEN>
Date: Sun, 02 Aug 2026 20:53:09 +0100
Message-ID: <87ecggnvtm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [02/Aug  6:16pm +03] wrote:
>> We've discussed this before and Eshel and Juri suggested that the thing
>> to do is make icomplete-in-buffer a proper completion-in-region-function
>> value, instead of hanging off the default completion infrastructure as
>> it does now.
>
> Shouldn't the UI of icomplete-in-buffer be the same as the UI
> of icomplete in the minibuffer?  That is, only when the user
> types TAB, it should display the *Completions* buffer,
> either in the minibuffer or in the regular buffer.
> But otherwise on typing characters it should display inline
> candidates immediately, without requiring to type TAB,
> i.e. something like 'completion-preview-mode' already does.

Do you mean after the *second* tab?  I think the first should definitely
only display the inline candidates.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 2 Aug 2026 15:18:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 02 11:18:17 2026
Received: from localhost ([127.0.0.1]:44601 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqXxA-0001Ps-Om
	for submit <at> debbugs.gnu.org; Sun, 02 Aug 2026 11:18:17 -0400
Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:51800)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wqXx4-0001P0-Mk
 for 81537 <at> debbugs.gnu.org; Sun, 02 Aug 2026 11:18:11 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:b231:465::2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4hCk2f4WHtzKnSh;
 Sun, 02 Aug 2026 17:18:02 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1785683882;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=qQfB4FdC5XykT103BbmRLyj5chxP/g2+6E3bBSnviKQ=;
 b=mFnXRtGiNH8xL13xvN10XpWGM4p2zTWAkncsUVbZLUyuczqJPK8m5TwhTAeHYRFP/jeAF8
 nYB2xqZ5L2pHEc0E7hOiEeYn9c4USswivghAF9xYMG1wugPtCt2rRR0EVVnStflqvZBynj
 bbA0fyupUiFHDYcju48sFA2o5JGOLUThxTCQpM50c9LxNk+cfvZno74AHGg/acCLP9ArlN
 XIrgWTgrQZDvy+mrAKCqE+qTYvJ6mVurECOFt3oMenROxhz6T+I3jXk26feOtHJZA+7P9P
 LlqG/t8SI1fg2PG0TXkfhdNGN2MWS4g9j9hgfww4viJceCUWYJh5dKGAXFPQEw==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <875x1swzsl.fsf@HIDDEN>
Organization: LINKOV.NET
References: <875x1swzsl.fsf@HIDDEN>
Date: Sun, 02 Aug 2026 18:16:12 +0300
Message-ID: <87fr0w1rsf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4hCk2f4WHtzKnSh
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> We've discussed this before and Eshel and Juri suggested that the thing
> to do is make icomplete-in-buffer a proper completion-in-region-function
> value, instead of hanging off the default completion infrastructure as
> it does now.

Shouldn't the UI of icomplete-in-buffer be the same as the UI
of icomplete in the minibuffer?  That is, only when the user
types TAB, it should display the *Completions* buffer,
either in the minibuffer or in the regular buffer.
But otherwise on typing characters it should display inline
candidates immediately, without requiring to type TAB,
i.e. something like 'completion-preview-mode' already does.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 2 Aug 2026 14:57:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 02 10:57:23 2026
Received: from localhost ([127.0.0.1]:44366 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqXcw-0008Si-Uf
	for submit <at> debbugs.gnu.org; Sun, 02 Aug 2026 10:57:23 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31440)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1wqXcu-0008SS-9C
 for 81537 <at> debbugs.gnu.org; Sun, 02 Aug 2026 10:57:20 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5D476440C40;
 Sun, 02 Aug 2026 10:57:14 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1785682633;
 bh=VsJhCGDm6EU8RJRRVrUt52FZ0BSBA+dM4fuXMebmeGI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=FqPYjjZSYvWmd5ifHJyGjTPv31hMIQctpsVFufs3eBRWbQJMhADd7VLWEZiBwi4N8
 bo2Ww+0qmjkZs2Hj8cURPmoUiApIKzrvBgmuITACsoGXud75bxL5eBD4XbAe7I226a
 jlqduCIZayic+rR5e4FSgX03Ujx1IImCDIAcgXxH977Ae3enmjGDIQNWk1c+y+lNdg
 hODiW09x+dnrLRHqyzFLapfAZnhvZQfHwxRzHvf0ZSVRkqGfEVCAyso7IW781GsJi8
 koNOQ3nXJkBnkkDstrWoLaEa+PPQEm5bBX78epVIZ8nDHMW+LmcFdv0xywI66ja4l9
 BcKGY89NN3cSw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 70F2E440BBC;
 Sun, 02 Aug 2026 10:57:13 -0400 (EDT)
Received: from pastel (104-195-207-192.cpe.teksavvy.com [104.195.207.192])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3AE41120437;
 Sun,  2 Aug 2026 10:57:13 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Sean Whitton <spwhitton@HIDDEN>
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <875x1swzsl.fsf@HIDDEN>
Message-ID: <jwvldaowozf.fsf-monnier+emacs@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
Date: Sun, 02 Aug 2026 10:57:12 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.135 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81537
Cc: 81537 <at> debbugs.gnu.org, me@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I haven't got much experience in this area so perhaps the above contains
> some misconceptions.  Let me know how it seems to you all.
> Otherwise, I propose the following patch for master.

+1 on the analysis and description of the problem, and the patch.
Thanks Sean,


=== Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at 81537 <at> debbugs.gnu.org:


Received: (at 81537) by debbugs.gnu.org; 2 Aug 2026 11:12:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 02 07:12:53 2026
Received: from localhost ([127.0.0.1]:41111 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqU7g-00071n-JW
	for submit <at> debbugs.gnu.org; Sun, 02 Aug 2026 07:12:53 -0400
Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]:39081)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wqU7d-00071Z-Qr
 for 81537 <at> debbugs.gnu.org; Sun, 02 Aug 2026 07:12:51 -0400
Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47])
 by mailfout.stl.internal (Postfix) with ESMTP id DCFBC1D00072;
 Sun,  2 Aug 2026 07:12:43 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-07.internal (MEProxy); Sun, 02 Aug 2026 07:12:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm1; t=1785669163; x=
 1785755563; bh=eXAmUoUlyrqxhcnQ8/nNHZRSntM+T1MeMA9wpW/WXaU=; b=4
 gU2CsBEImyvtENHfqGc8wuHVA6RQ9UGInobYn0uRIn3KjEmXXtD1VsKzabYcp3YG
 ZXheBJj5Er1SlPehVaPlUk+rYe1Ii1RTpZmemXs/79hf3nqgW4dIdvz7dPbZIaTX
 P01KRmFW0KfYzzuhR7a/oC1B3SyEek8norZvrX4J+ukDqXLQ/Wz4biHeS1GOXuf9
 VzUbHMW6O7Mt0QzMOAxez/KzkuwQkUB1CHuGcyGpJvQYN2Ivfasl4yU1+TT7Eg1S
 RhKvqO2L0QSRKDQ3mEb0jmbo6CnmtWQNpSzBi4IZXaMwioV6hrRz2GuTQR7Q8BZc
 Cf1AzGok2RPBMoI4DhxYw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
 1785669163; x=1785755563; bh=eXAmUoUlyrqxhcnQ8/nNHZRSntM+T1MeMA9
 wpW/WXaU=; b=hUaVWlFgkXnAM5HbKk8tZEy55P9n6whaQZkucwM9ijyx1J7A1Od
 XrhrMQFGbPfftM23pByZp3p2GPjdBU0TXMxH9w9ofutW+UgkCtUlZ1IbDzClsM7a
 AM+9sE7UC49o4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VDZWj0lCxMnPOuuzcuNdwErTMBLz+YH18ml8bt
 iz0y+s183rImxtsIZfwFvD+yyThtVa440BvTdHbBXKtQ5wRNz1ofusEZOIAtgtPXhQEJSN
 Z1yO2PUHWQ3JCI21TT3o9tvm+odDa0ZsnDqs+7lwXhU2ecT/BjERJ3mFipnw
X-ME-Proxy: <xmx:KyZvaifyuLeO2sez52LRXvkbmARDFmkktUBIg1CG4jh0PQOZLPhpGw>
 <xmx:KyZvahk4LflTLOrjx3Xlas7MMfciYeW1Pj7s6GdnevEW9Tg9bhOidg>
 <xmx:KyZvajs_4DidcMROITrBX71LooobG4dy9GIe65l-ilJrGXdVzvWQlQ>
 <xmx:KyZvav-AwMcIhTMXuH6TZQFJXpT_iSnoVRImhN5DlO9wEqpk9HI9Wg>
 <xmx:KyZvaj1muXS0QstbiEqwU1upjgLDYPgJNlqKXdxEHm4tac5SYPwpC0IH>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 2 Aug 2026 07:12:43 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 203AE940507; Sun, 02 Aug 2026 12:12:42 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: 81537 <at> debbugs.gnu.org
Subject: Re: bug#81537: 32.0.50; Fixing icomplete-in-buffer requiring users
 to advice-add
In-Reply-To: <875x1swzsl.fsf@HIDDEN>
References: <875x1swzsl.fsf@HIDDEN>
Date: Sun, 02 Aug 2026 12:12:41 +0100
Message-ID: <87jyq8ojx2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81537
Cc: me@HIDDEN, monnier@HIDDEN, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Here's a very similar patch, perhaps slightly cleaner.
--
 etc/NEWS           | 10 ++++++++++
 lisp/icomplete.el  | 10 +---------
 lisp/minibuffer.el | 31 +++++++++++++++++++++----------
 3 files changed, 32 insertions(+), 19 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 23b97971105..ead3f7fb72c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -97,6 +97,16 @@ You can restore the previous behavior by removing
 ---
 *** The variable 'completion-ignore-case' is now customizable.
 
+---
+*** 'icomplete-in-buffer' users need no longer advise 'completion-at-point'.
+The "*Completions*" buffer no longer pops up in addition to Icomplete's
+in-buffer display of completions, by default.
+Therefore, the instructions in the NEWS file for Emacs 30.1 to add
+
+    (advice-add 'completion-at-point :after #'minibuffer-hide-completions)
+
+to your initialization file no longer apply, and you may remove it.
+
 
 * Editing Changes in Emacs 32.1
 
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 9a1202c30af..c8da0e9bf9b 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -154,15 +154,7 @@ icomplete-max-delay-chars
 (defcustom icomplete-in-buffer nil
   "If non-nil, use Icomplete when completing in buffers other than minibuffer.
 This affects commands like `completion-in-region', but not commands
-that use their own completions setup.
-
-If you would prefer to see only Icomplete's in-buffer display, but do
-not want the \"*Completions*\" buffer to pop up in those cases, add
-this advice to your init file:
-
-  (advice-add \\='completion-at-point
-              :after #\\='minibuffer-hide-completions)
-"
+that use their own completions setup."
   :type 'boolean)
 
 (defcustom icomplete-minibuffer-setup-hook nil
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 6c13fcabe54..10c55605c13 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1581,6 +1581,9 @@ completion--in-boundaries-p
          (end (+ (length string) (cdr boundaries))))
     (>= start pos end)))
 
+(defun completion--icomplete-in-buffer-p ()
+  (eq (bound-and-true-p icomplete--in-region-buffer) (current-buffer)))
+
 (defun completion--do-completion (beg end &optional
                                       try-completion-function expect-exact)
   "Do the completion and return a summary of what happened.
@@ -1686,6 +1689,7 @@ completion--do-completion
               (minibuffer-force-complete beg end))
              ((or completed only-changed-boundaries)
               (cond
+               ((completion--icomplete-in-buffer-p))
                ((pcase completion-auto-help
                   ('visible (minibuffer--completions-visible))
                   ('always t))
@@ -1699,16 +1703,18 @@ completion--do-completion
                                           'exact 'unknown))))))
              ;; Show the completion table, if requested.
              ((not exact)
-	      (if (pcase completion-auto-help
-                    ('lazy (eq this-command last-command))
-                    (_ completion-auto-help))
+	      (if (and (pcase completion-auto-help
+                         ('lazy (eq this-command last-command))
+                         (_ completion-auto-help))
+                       (not (completion--icomplete-in-buffer-p)))
                   (minibuffer-completion-help beg end)
                 (completion--message "Next char not unique")))
              ;; If the last exact completion and this one were the same, it
              ;; means we've already given a "Complete, but not unique" message
              ;; and the user's hit TAB again, so now we give him help.
              (t
-              (when (and (eq this-command last-command) completion-auto-help)
+              (when (and (eq this-command last-command) completion-auto-help
+                         (not (completion--icomplete-in-buffer-p)))
                 (minibuffer-completion-help beg end))
               (completion--done completion 'exact
                                 (unless (or expect-exact
@@ -1774,12 +1780,17 @@ completion--in-region-1
    (t (prog1 (pcase (completion--do-completion beg end)
                (#b000 nil)
                (_     t))
-        (if (window-live-p minibuffer-scroll-window)
-            (and (eq completion-auto-select t)
-                 (eq t (frame-visible-p (window-frame minibuffer-scroll-window)))
-                 ;; When the completion list window was displayed, select it.
-                 (switch-to-completions))
-          (completion-in-region-mode -1))))))
+        ;; FIXME: This reintroduces bug#67001 for `icomplete-in-region'
+        ;; users.  It's not as bad for them, because Icomplete users
+        ;; probably expect to have to C-g out of completion before using
+        ;; other bindings, but it would still be better to fix it.  --spwhitton
+        (unless (completion--icomplete-in-buffer-p)
+          (if (window-live-p minibuffer-scroll-window)
+              (and (eq completion-auto-select t)
+                   (eq t (frame-visible-p (window-frame minibuffer-scroll-window)))
+                   ;; When the completion list window was displayed, select it.
+                   (switch-to-completions))
+            (completion-in-region-mode -1)))))))
 
 (defun completion--cache-all-sorted-completions (beg end comps)
   (add-hook 'after-change-functions
-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Aug 2026 11:02:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 02 07:02:54 2026
Received: from localhost ([127.0.0.1]:41020 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wqTy1-0006Px-Gh
	for submit <at> debbugs.gnu.org; Sun, 02 Aug 2026 07:02:54 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:60060)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wqTxy-0006PX-Pz
 for submit <at> debbugs.gnu.org; Sun, 02 Aug 2026 07:02:51 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spwhitton@HIDDEN>)
 id 1wqTxq-0003fb-NG
 for bug-gnu-emacs@HIDDEN; Sun, 02 Aug 2026 07:02:43 -0400
Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spwhitton@HIDDEN>)
 id 1wqTxo-0002xa-Kb
 for bug-gnu-emacs@HIDDEN; Sun, 02 Aug 2026 07:02:42 -0400
Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44])
 by mailfout.stl.internal (Postfix) with ESMTP id EAE611D00038
 for <bug-gnu-emacs@HIDDEN>; Sun,  2 Aug 2026 07:02:38 -0400 (EDT)
Received: from phl-frontend-03 ([10.202.2.162])
 by phl-compute-04.internal (MEProxy); Sun, 02 Aug 2026 07:02:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:content-type:content-type:date:date:from:from:in-reply-to
 :message-id:mime-version:reply-to:subject:subject:to:to; s=fm1;
 t=1785668558; x=1785754958; bh=1LYPV6ICnfeGV2YhF5wFuUZjU3QhHGms
 CepT9AhO7Wk=; b=L8wE+t/MpJVJvdlpypq2szZa6FBVsTd85lzaemwD+NaV0DZ0
 iecpYURTSco1W8JBw2cFHcwOjiEx0viDVhpCuZDP0imNOttGtefzsiXQd2xqx3sA
 4rtlSbPPNazhb6g4Dh0NimucIkiGZ64CR6DHOcwtA+I9ooQNqObPWys7vfe38Q93
 Bf50L+pymZ2OVa5G+L3cZpKiE81KiyMoIfKfCwyGJa+9Z0vAVsu5BPhXKZHYuYGQ
 Ze3rPvEezs4huWBKJM3Hio6eQU4Z7r60kC2s9IaAHWBSfAsmwmiCkB4GiBWsGwGi
 FiQderXebcFuwsidEpNOWV2FQhSdpdGGMz0sWw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:message-id
 :mime-version:reply-to:subject:subject:to:to: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uai
 vyRhvgm242bc0L51+YnMk6X8NBLdS1qZ/k8HA7rKIa8iLxa2cFR5d96O7rK+DXh5KWYXXt
 g/NL1NGX5eyh5v8A+nPXsiSWcf99pV3thGcHbzNWN2z8R0aubusFNKLVhO6M0mUcpDDv01
 iWMz5kcJ81VjQoZ+JQm4hKmp3rTqerh5PuDCu/pdpk16RoHlZ+K9FUEsdG+mYs1SIM7OFz
 K3BAacXfqopgfFyWbSpJWbdGAThbjOxEKhUS9042BtukWM6ZyMKCq+zIOebreT3M5dIXAs
 zUlpom3Ku65SERiU8SvwbIpAsVTEd4RerrUs3Ol9OBhTE/37xSP/zJgfEFtQz0D17RhUdn
 JG5VLu3CQvA6YRpFdfmFqW7J88SrHW6uWqbRWdtlcB4sARMJ+/pHoIg1QWQQ
X-ME-Proxy: <xmx:ziNvatoAnZlyyMVuL2O5yzZgqtckvky7f3R6-d_uLNtLCmyaYyp1hw>
 <xmx:ziNvahqkt8eGhzc4weqYpsWsRSpun7mduPoS-IgWLyqd14_J_XHU6A>
 <xmx:ziNvajm8DUM_a-A8UbvGr_3A0ErSWGZggdWE8wtTUeFB8HYvD8gYNQ>
 <xmx:ziNvarFPpXckihikuYRmzU2-ds35tZwZvEGaAkmnb-lumWjH013ClQ>
 <xmx:ziNvah0LGC7Nzp72kgcj5UkNbl2xqxgmM1A3j74ijXVnJQ1QgS4IMJZr>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Sun, 2 Aug 2026 07:02:38 -0400 (EDT)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 0F52C940507; Sun, 02 Aug 2026 12:02:35 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 32.0.50; Fixing icomplete-in-buffer requiring users to advice-add
Date: Sun, 02 Aug 2026 12:02:34 +0100
Message-ID: <875x1swzsl.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=202.12.124.151;
 envelope-from=spwhitton@HIDDEN; helo=fout-b8-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

X-debbugs-cc: juri@HIDDEN, me@HIDDEN, monnier@HIDDEN

I wrote these entries for NEWS.30:

    ** 'completion-auto-help' now affects 'icomplete-in-buffer'.
    Previously, 'completion-auto-help' mostly affected only minibuffer
    completion.  Now, if 'completion-auto-help' has the value 'lazy', then
    Icomplete's in-buffer display of possible completions will only appear
    after the 'completion-at-point' command has been invoked twice, and if
    'completion-auto-help' is nil, then Icomplete's in-buffer display is
    completely suppressed.  Thus, if you use 'icomplete-in-buffer', ensure
    'completion-auto-help' is not customized to 'lazy' or nil.
    
    ** The "*Completions*" buffer now always accompanies 'icomplete-in-buffer'.
    Previously, it was not consistent whether the "*Completions*" buffer would
    appear when using 'icomplete-in-buffer'.  Now the "*Completions*" buffer
    and Icomplete's in-buffer display of possible completions always
    appear together.  If you would prefer to see only Icomplete's
    in-buffer display, and not the "*Completions*" buffer, you can add this
    to your init file:
    
        (advice-add 'completion-at-point :after #'minibuffer-hide-completions)

We say "If you would prefer ..." but really all users would not want to
see both displays.  Someone who really wants to see both should be the
one who has to add some advice to *show* the completions.
Also, populating the *Completions* buffer only to then hide it is a
performance hit.

We've discussed this before and Eshel and Juri suggested that the thing
to do is make icomplete-in-buffer a proper completion-in-region-function
value, instead of hanging off the default completion infrastructure as
it does now.

I've been looking into this over the weekend and I think that it would
not be a good idea to try to do that.  Icomplete is heavily dependent on
the default completion process in a couple of senses:
- it relies on various completion- and completion-- functions and
  variables, and some of the state changes
- in its primary mode, in the minibuffer, it is architected as a pure
  supplement to the default completion, instead of a whole completions
  interface of its own.

So, if we were to try to rearchitect Icomplete to work as a bona fide
completion-in-region-function, we would likely break various subtle
behavioural tweaks that have gone into Icomplete over the years that
make it work as well as it does, and also invalidate code in people's
initialisation files.  For example, I found while trying things out that
some Icomplete code in my initialization file was relying on the value
of completion-all-sorted-completions in a way that subtly broke once I
tried moving away from the default completion infrastructure.  The code
would surely be fixable, but I wouldn't want to make users do that.

I haven't got much experience in this area so perhaps the above contains
some misconceptions.  Let me know how it seems to you all.
Otherwise, I propose the following patch for master.

--
 etc/NEWS           | 10 ++++++++++
 lisp/icomplete.el  | 10 +---------
 lisp/minibuffer.el | 20 ++++++++++++++++----
 3 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 23b97971105..ead3f7fb72c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -97,6 +97,16 @@ You can restore the previous behavior by removing
 ---
 *** The variable 'completion-ignore-case' is now customizable.
 
+---
+*** 'icomplete-in-buffer' users need no longer advise 'completion-at-point'.
+The "*Completions*" buffer no longer pops up in addition to Icomplete's
+in-buffer display of completions, by default.
+Therefore, the instructions in the NEWS file for Emacs 30.1 to add
+
+    (advice-add 'completion-at-point :after #'minibuffer-hide-completions)
+
+to your initialization file no longer apply, and you may remove it.
+
 
 * Editing Changes in Emacs 32.1
 
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 9a1202c30af..c8da0e9bf9b 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -154,15 +154,7 @@ icomplete-max-delay-chars
 (defcustom icomplete-in-buffer nil
   "If non-nil, use Icomplete when completing in buffers other than minibuffer.
 This affects commands like `completion-in-region', but not commands
-that use their own completions setup.
-
-If you would prefer to see only Icomplete's in-buffer display, but do
-not want the \"*Completions*\" buffer to pop up in those cases, add
-this advice to your init file:
-
-  (advice-add \\='completion-at-point
-              :after #\\='minibuffer-hide-completions)
-"
+that use their own completions setup."
   :type 'boolean)
 
 (defcustom icomplete-minibuffer-setup-hook nil
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 6c13fcabe54..c96de7e4ec1 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1581,6 +1581,9 @@ completion--in-boundaries-p
          (end (+ (length string) (cdr boundaries))))
     (>= start pos end)))
 
+(defun completion--icomplete-in-buffer-p ()
+  (eq (bound-and-true-p icomplete--in-region-buffer) (current-buffer)))
+
 (defun completion--do-completion (beg end &optional
                                       try-completion-function expect-exact)
   "Do the completion and return a summary of what happened.
@@ -1689,7 +1692,8 @@ completion--do-completion
                ((pcase completion-auto-help
                   ('visible (minibuffer--completions-visible))
                   ('always t))
-                (minibuffer-completion-help beg end))
+                (unless (completion--icomplete-in-buffer-p)
+                 (minibuffer-completion-help beg end)))
                (t (minibuffer-hide-completions)
                   (when exact
                     ;; If completion did not put point at end of field,
@@ -1702,13 +1706,15 @@ completion--do-completion
 	      (if (pcase completion-auto-help
                     ('lazy (eq this-command last-command))
                     (_ completion-auto-help))
-                  (minibuffer-completion-help beg end)
+                  (unless (completion--icomplete-in-buffer-p)
+                    (minibuffer-completion-help beg end))
                 (completion--message "Next char not unique")))
              ;; If the last exact completion and this one were the same, it
              ;; means we've already given a "Complete, but not unique" message
              ;; and the user's hit TAB again, so now we give him help.
              (t
-              (when (and (eq this-command last-command) completion-auto-help)
+              (when (and (eq this-command last-command) completion-auto-help
+                         (not (completion--icomplete-in-buffer-p)))
                 (minibuffer-completion-help beg end))
               (completion--done completion 'exact
                                 (unless (or expect-exact
@@ -1774,7 +1780,13 @@ completion--in-region-1
    (t (prog1 (pcase (completion--do-completion beg end)
                (#b000 nil)
                (_     t))
-        (if (window-live-p minibuffer-scroll-window)
+        (if (or (window-live-p minibuffer-scroll-window)
+                ;; FIXME: This reintroduces bug#67001 for
+                ;; `icomplete-in-region' users.  It's not as bad for
+                ;; them, because Icomplete users probably expect to have
+                ;; to C-g out of completion before using other bindings,
+                ;; but it would still be better to fix it.  --spwhitton
+                (completion--icomplete-in-buffer-p))
             (and (eq completion-auto-select t)
                  (eq t (frame-visible-p (window-frame minibuffer-scroll-window)))
                  ;; When the completion list window was displayed, select it.
-- 
Sean Whitton




Acknowledgement sent to Sean Whitton <spwhitton@HIDDEN>:
New bug report received and forwarded. Copy sent to juri@HIDDEN, me@HIDDEN, monnier@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to juri@HIDDEN, me@HIDDEN, monnier@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#81537; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 8 Aug 2026 13:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.