[Top][All Lists]

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

Re: Updating *Completions* as you type

From: Juri Linkov
Subject: Re: Updating *Completions* as you type
Date: Mon, 16 Oct 2023 19:54:33 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> I tried this out, and I came across a certain issue: say you do
> `C-h o foo TAB`, and then looking at the completion candidates
> you realize you actually wanted something with `bar`, so you
> type `M-DEL` to delete `foo` from the minibuffer to make room
> for `bar`.  But now `post-command-hook` runs with an empty
> minibuffer before you start typing `bar`, so it updates the
> completions buffer with a very large list of symbols, causing
> Emacs to briefly stall.  I think that the completions buffer
> possibly shouldn't be updated when the minibuffer is empty.

This looks like icomplete-show-matches-on-no-input.

> Perhaps there could be a minimum minibuffer contents size for
> updating the completions buffer, or some other heuristic to
> avoid auto-displaying excessively large sets of candidates.

And this is like icomplete-max-delay-chars.

> Another option is to update the completions buffer on
> `post-self-insert-hook` instead of `post-command-hook`, that
> way you only update the completions buffer when the user
> actually inserts input in the minibuffer, and you don't need to
> keep a `completions-no-auto-update-commands` list.

Is `post-self-insert-hook` called for pasting a string?
Maybe better to replace blocklist with allowlist that contains
a list '(self-insert-command yank)' by default as discussed in

reply via email to

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