GNU bug report logs -
#80055
[PATCH] eager-display *Completions* again after completion failure
Previous Next
To reply to this bug, email your comments to 80055 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
mail <at> daniel-mendler.de, juri <at> linkov.net, bug-gnu-emacs <at> gnu.org:
bug#80055; Package
emacs.
(Mon, 22 Dec 2025 21:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Spencer Baugh <sbaugh <at> janestreet.com>:
New bug report received and forwarded. Copy sent to
mail <at> daniel-mendler.de, juri <at> linkov.net, bug-gnu-emacs <at> gnu.org.
(Mon, 22 Dec 2025 21:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
If the completion table requests eager-update (so *Completions*
should be updated as the user types, when already displayed)
then *Completions* will be dismissed automatically if the user
types something which isn't a completion. Previously,
*Completions* wouldn't be redisplayed until the user requests it
again. Now, if the completion table also enables eager-display
in addition to eager-update, then automatically redisplay
*Completions* after it disappears.
In GNU Emacs 30.1.90 (build 90, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.15.12, Xaw scroll bars) of 2025-12-04 built on
igm-qws-u22796a
Repository revision: 88878f209ee0f1699952b1ba5fb829c502f5959f
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.10 (Green Obsidian)
Configured using:
'configure --with-x-toolkit=lucid --without-gpm --without-gconf
--without-selinux --without-imagemagick --with-modules --with-gif=no
--with-cairo --with-rsvg --without-compress-install --with-tree-sitter
--with-native-compilation=aot
PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/'
[0001-eager-display-Completions-again-after-completion-fai.patch (text/patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80055; Package
emacs.
(Tue, 23 Dec 2025 07:37:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 80055 <at> debbugs.gnu.org (full text, mbox):
> If the completion table requests eager-update (so *Completions*
> should be updated as the user types, when already displayed)
> then *Completions* will be dismissed automatically if the user
> types something which isn't a completion. Previously,
> *Completions* wouldn't be redisplayed until the user requests it
> again. Now, if the completion table also enables eager-display
> in addition to eager-update, then automatically redisplay
> *Completions* after it disappears.
Thanks, this is very much needed. It was too inconvenient
when *Completions* disappeared after typing TAB that completes
to the common prefix of remaining completions.
So I will test the patch for a while.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80055; Package
emacs.
(Tue, 23 Dec 2025 10:18:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 80055 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
>> If the completion table requests eager-update (so *Completions*
>> should be updated as the user types, when already displayed)
>> then *Completions* will be dismissed automatically if the user
>> types something which isn't a completion. Previously,
>> *Completions* wouldn't be redisplayed until the user requests it
>> again. Now, if the completion table also enables eager-display
>> in addition to eager-update, then automatically redisplay
>> *Completions* after it disappears.
>
> Thanks, this is very much needed. It was too inconvenient
> when *Completions* disappeared after typing TAB that completes
> to the common prefix of remaining completions.
> So I will test the patch for a while.
Hello Spencer,
Besides this problem, I've observed another issue when I type quickly
with eager-update/eager-display. The *Completions* buffer somehow
breaks, just displaying an empty buffer. I am testing this with my
Consult package, see the commit with
eager-update/eager-display/minibuffer-visible-completions support:
https://github.com/minad/consult/commit/7be0d6bf556b608b0b38d006a4f66be849d721e0
This seems due to the interrupt and an error which disables the PCH?
From that point on the buffer stays empty and I have to restart
completion again. Have you observed something like this too? Thanks!
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80055; Package
emacs.
(Tue, 23 Dec 2025 16:32:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 80055 <at> debbugs.gnu.org (full text, mbox):
Daniel Mendler <mail <at> daniel-mendler.de> writes:
> Juri Linkov <juri <at> linkov.net> writes:
>
>>> If the completion table requests eager-update (so *Completions*
>>> should be updated as the user types, when already displayed)
>>> then *Completions* will be dismissed automatically if the user
>>> types something which isn't a completion. Previously,
>>> *Completions* wouldn't be redisplayed until the user requests it
>>> again. Now, if the completion table also enables eager-display
>>> in addition to eager-update, then automatically redisplay
>>> *Completions* after it disappears.
>>
>> Thanks, this is very much needed. It was too inconvenient
>> when *Completions* disappeared after typing TAB that completes
>> to the common prefix of remaining completions.
>> So I will test the patch for a while.
>
> Hello Spencer,
>
> Besides this problem, I've observed another issue when I type quickly
> with eager-update/eager-display. The *Completions* buffer somehow
> breaks, just displaying an empty buffer. I am testing this with my
> Consult package, see the commit with
> eager-update/eager-display/minibuffer-visible-completions support:
> https://github.com/minad/consult/commit/7be0d6bf556b608b0b38d006a4f66be849d721e0
>
> This seems due to the interrupt and an error which disables the PCH?
>>From that point on the buffer stays empty and I have to restart
> completion again. Have you observed something like this too? Thanks!
I think I saw something like this once, but only once, ever. Are you
consistently getting it? A config which consistently experiences this
would be interesting.
Also, continuing to type should continue to update *Completions*. Is
that not what you were experiencing? Did it stay permanently blank?
I didn't do it in this patch, but I think probably eager-update should
be implemented with an idle timer just like I've done for eager-display.
Then if the update gets interrupted, it can try again when the user is
next idle. That would make the blank buffer go away automatically in
more cases, when the user is next idle.
BTW: I see your config suggests setting completion-show-inline-help=nil
because otherwise completion has some annoying blocking behavior. This
is due to minibuffer-message calling sit-for, and the patch in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79510 will actually fix
that. It just needs a NEWS entry; I have it backported to my own site.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80055; Package
emacs.
(Tue, 23 Dec 2025 17:25:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 80055 <at> debbugs.gnu.org (full text, mbox):
Spencer Baugh <sbaugh <at> janestreet.com> writes:
> Daniel Mendler <mail <at> daniel-mendler.de> writes:
>
>> Juri Linkov <juri <at> linkov.net> writes:
>>
>>>> If the completion table requests eager-update (so *Completions*
>>>> should be updated as the user types, when already displayed)
>>>> then *Completions* will be dismissed automatically if the user
>>>> types something which isn't a completion. Previously,
>>>> *Completions* wouldn't be redisplayed until the user requests it
>>>> again. Now, if the completion table also enables eager-display
>>>> in addition to eager-update, then automatically redisplay
>>>> *Completions* after it disappears.
>>>
>>> Thanks, this is very much needed. It was too inconvenient
>>> when *Completions* disappeared after typing TAB that completes
>>> to the common prefix of remaining completions.
>>> So I will test the patch for a while.
>>
>> Hello Spencer,
>>
>> Besides this problem, I've observed another issue when I type quickly
>> with eager-update/eager-display. The *Completions* buffer somehow
>> breaks, just displaying an empty buffer. I am testing this with my
>> Consult package, see the commit with
>> eager-update/eager-display/minibuffer-visible-completions support:
>> https://github.com/minad/consult/commit/7be0d6bf556b608b0b38d006a4f66be849d721e0
>>
>> This seems due to the interrupt and an error which disables the PCH?
>>>From that point on the buffer stays empty and I have to restart
>> completion again. Have you observed something like this too? Thanks!
>
> I think I saw something like this once, but only once, ever. Are you
> consistently getting it? A config which consistently experiences this
> would be interesting.
The bug appears consistently in a minimal configuration. I created
bug#80064 to track this and I've put you in CC. I could produce it most
easily with Consult, but I've just seen that my recipe also works with
M-x only. The trick is to press backspace to quickly delete input and
this way trigger increasingly expensive candidate computations.
> Also, continuing to type should continue to update *Completions*. Is
> that not what you were experiencing? Did it stay permanently blank?
It stays blank. Completion is broken from that point on. I think there
is something wrong with the PCH or it doesn't get installed properly,
maybe due to interrupts. I haven't really looked deeply into this, but I
find the logic a little bit confusing with the mix of
after-change-functions and PCH.
> I didn't do it in this patch, but I think probably eager-update should
> be implemented with an idle timer just like I've done for eager-display.
> Then if the update gets interrupted, it can try again when the user is
> next idle. That would make the blank buffer go away automatically in
> more cases, when the user is next idle.
Yes, maybe this would fix the problem.
> BTW: I see your config suggests setting completion-show-inline-help=nil
> because otherwise completion has some annoying blocking behavior. This
> is due to minibuffer-message calling sit-for, and the patch in
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79510 will actually fix
> that. It just needs a NEWS entry; I have it backported to my own site.
Thanks, that's a good improvement.
Daniel
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.