bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45474: Icomplete exhibiting in recursive minibuffer when it shouldn’


From: Juri Linkov
Subject: bug#45474: Icomplete exhibiting in recursive minibuffer when it shouldn’t
Date: Sat, 17 Apr 2021 23:49:01 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> Or maybe simply disable previous icomplete when recursive minibuffer
>> doesn't use completions.
>
> And how would you detect whether a recursive minibuffer expects completions
> or not?

Oh, I see it's a more fundamental problem:

1. completing-read-default let-binds minibuffer-completion-table to a collection
   before calling read-from-minibuffer;
2. any nested call to read-from-minibuffer reuses the same value of
   minibuffer-completion-table, even if it doesn't use completion;
3. icomplete checks for minibuffer-completion-table to decide
   whether to activate icomplete completions in the minibuffer.

This is how non-completion minibuffers get non-nil minibuffer-completion-table.

'read-string' solves this problem by let-binding minibuffer-completion-table
to nil before calling read-from-minibuffer.  'read-number' could do the same.
But what about all other calls of 'read-from-minibuffer'?  They all can't be
replaced with a new function that will let-bind minibuffer-completion-table
to nil.

I have no idea how to fix this.  Maybe Stefan could help (Cc:ed).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]