reddit / emacs

icomplete-compute-delay

RepublicWorried · 2022-11-07 18:52
just figured out that this variable is by default set to 0.15 which causes M-x and change-buffer etc. to have a slight delay when called. ​ Why on earth would that be the default setting? Oo
AsterOps · 2022-11-07 20:34
You can change to `0`, but what will you do with the saved time?
globalcandyamnesia · 2022-11-07 21:37
You can also set it to -1 to enable `icomplete-premonitions-mode`
renzmann · 2022-11-07 23:47
I remember having similar frustrations with more than one completion framework, both for minibuffer and completion-at-point. I can only imagine it’s a vestige from when candidate generation might have needed a moment to catch up with the display UI, but that’s just my speculation
RepublicWorried · 2022-11-08 07:11
>icomplete-premonitions-mode thanks, and what does that do?
ForkInBrain · 2022-11-08 16:46
> Why on earth would that be the default setting? Two reasons: * There exist computers slower than yours. When Emacs is busy computing completions it cannot respond to key presses at all. * Your tireless Emacs maintainers discussed it, tried out various things, and considered it to be the best compromise at the time. That is "why on earth". That delay was reduced and tweaked in 2021. * [commit](https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=8d5b7f519f18ed73f26adff275e3bd580bacf36c) * [discussion](https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00111.html) Before that, it had a default of 0.3 seconds, set in 1997! * [commit](https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=92f7d0036fe5eeb041a9cadc9560dc1645a3fb4f)
RepublicWorried · 2022-11-08 17:31
Thanks