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: Gregory Heytings
Subject: bug#45474: Icomplete exhibiting in recursive minibuffer when it shouldn’t
Date: Sun, 18 Apr 2021 22:23:46 +0000


See the attached patch. I's a draft, as I said read-from-minibuffer-simple could probably renamed to something more elegant, and (at least some of) the other calls to read-from-minibuffer could be replaced by the macro.

Ah, I see. But that's based on "blacklisting" those places that don't want to use minibuffer-completion-table, so it requires changes in many places (including outside of Emacs's codebase).


It would be possible to use whitelisting instead by renaming the current read-from-minibuffer to internal-read-from-minibuffer, which would be wrapped in a macro read-from-minibuffer. The change would be transparent, except for those places (e.g. completing-read-default) where what we actually want is to use internal-read-from-minibuffer. But this change would be slightly more invasive than what follows.

These are yet other possible approaches indeed, but it seems to me at first sight that they are more complex than the solution I suggest.

The patch below shows one way to do what I suggest.


Thanks. Somehow I feel that using the keymap to decide whether the completion table should be used isn't safe enough, it's possible (at least in theory) that a minibuffer with a certain keymap uses completion tables and another one using the same keymap does not. ISTM that it's safer (and more explicit) to use the current minibuffer depth for that purpose; see attached patch.


Just like your approach, I think this is only a temporary fix until we can solve the problem for real by making `minibuffer-completion-table` buffer-local


I'm not sure I fully understand why this is necessary, but is "Fmake_variable_buffer_local (Qminibuffer_completion_table);" just after "if ... specbind (Qminibuffer_completion_table, Qnil);" not enough for this?

Attachment: Make-it-possible-to-disable-completion-in-recursive-.patch
Description: Text Data


reply via email to

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