Closed krydos closed 5 months ago
Thanks for this proposal. It seems reasonable, but I am a little worried to change this behavior now. Also if you trigger manual completion, the popup won't go away again when deleting input. The popup must be dismissed explicitly with C-g or ESC.
In your comment there are a few red flags, regarding this feature request, which sound like a problematic configuration on your side:
...it freezes Emacs if there are too many options for completion...
...or I maybe have too many completion sources which makes my Emacs slow...
...I can't find anyone complaining about it...
Corfu should not freeze your Emacs. Corfu interrupts completion sources if they take too long and it is of course not recommended to use too many slow sources or sources creating tons of useless candidates. Can you please try to fix this, by reducing the amount of sources?
There are two other possibilities to resolve this:
(defun short-all-completions (string table pred point)
(and (length< string 4)
(completion-emacs21-all-completions string table pred point)))
(defun short-try-completion (string table pred point)
(and (length< string 4)
(completion-emacs21-try-completion string table pred point)))
(add-to-list 'completion-styles-alist
'(short
short-try-completion
short-all-completions
"Basic completion with length limit for speed up."))
Thanks for such a quick reply @minad
I just went through my config and noticed that I have some cape-*
functions added to completion-at-point-functions
which may cause the slowness and apparently if no one else have this issue then it's not a package problem.
I can't also reproduce it with emacs -Q
I'll fix it on my end.
Thank you for suggestions on how to fix it!
Currently the auto completion popup appears as soon as user enters
corfu-auto-prefix
number of characters but it never goes away even if user removes some characters. It may not sound like a problem but it freezes Emacs if there are too many options for completion.For example (when
corfu-auto-prefix
==3
):(mes
(I want to enter(message "...")
but then I changed my mind and want to enter something else)s
corfu-auto-prefix
e
m
to auto complete.Expected behavior for me is to close the completion popup as soon as the number of entered characters are less than
corfu-auto-prefix
.This issue is less prominent if you have a habit to use
M-Backspace
instead ofBackspace-Many-Times
as I used to do. I suffer from this issue every day but I can't find anyone complaining about it which makes me think that I either missed a variable that actually fixes this issue or I maybe have too many completion sources which makes my Emacs slow...In any case, let me know if you find this change valuable and let me know if I can improve anything code-wise.