-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ivy-sort-functions-alist can no longer handle lambda functions #1574
Comments
Not only can I not reproduce this (please try to provide a detailed set of steps starting from
So, what you probably want is: (add-to-list 'ivy-sort-functions-alist
(cons t (lambda (x y)
(> 0 (compare-strings x nil nil y nil nil t))))) |
Yeah, that was me typing it out incorrectly instead of copy pasting. I meant: (add-to-list 'ivy-sort-functions-alist
'(ivy-completion-in-region . (lambda (str1 str2)
(string< (downcase str1) (downcase str2))))) With this, trying to use completion in region results in |
Thanks, I can reproduce this now (and was the one who introduced the issue in the first place, while trying to fix another issue). FWIW, it is inadvisable to quote (add-to-list 'ivy-sort-functions-alist
(cons #'ivy-completion-in-region
(lambda (str1 str2)
(> 0 (compare-strings str1 nil nil str2 nil nil t))))) or (add-to-list 'ivy-sort-functions-alist
`(ivy-completion-in-region
. ,(lambda (str1 str2)
(> 0 (compare-strings str1 nil nil str2 nil nil t))))) |
ivy-test.el (ivy--sort-function): New test. Fixes abo-abo#1574
Cool, thanks for the tips |
Not sure why, but recent changes have made it so that
Results in an error saying lambda is an invalid function.
The text was updated successfully, but these errors were encountered: