You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Corfu enabled in common-lisp mode when completing at point, when the first candidate is equal to prompt, Corfu errors out with: Error in post-command-hook (corfu--post-command): (args-out-of-range 0 0).
This can be observed simply by trying to complete after car or not
I tracked this to the function corfu--move-to-front which uses delq on the list which references the cached Sly's completion table, effectively setting the first element to nil. See minad/corfu#285 for the reference.
With Corfu enabled in common-lisp mode when completing at point, when the first candidate is equal to prompt, Corfu errors out with:
Error in post-command-hook (corfu--post-command): (args-out-of-range 0 0)
.This can be observed simply by trying to complete after
car
ornot
I tracked this to the function
corfu--move-to-front
which usesdelq
on thelist
which references the cached Sly's completion table, effectively setting the first element tonil
. See minad/corfu#285 for the reference.As Corfu's maintainer kindly pointed out in the above mentioned issue, this seems to be the default Emacs behavior, that returned completion list can be destructively modified by a completion UI. For reference, this can be seen in the function
completion-all-sorted-completions
inminibuffer.el
:https://github.com/emacs-mirror/emacs/blob/15fc7b3cde92e420f48dfe188251e6af4d832af5/lisp/minibuffer.el#L1640-L1661
The easiest solution might be to return a copy of the cached completion candidate list.
Thank you for your time!
The text was updated successfully, but these errors were encountered: