-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix 'wrong-type-argument' error with ivy-prescient #119
Conversation
With format-all, if more than one formatter is available for a
This PR can fix such problems. |
9af087b
to
61daeed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! One more comment
ivy-prescient.el
Outdated
element | ||
(cond ((symbolp element) (symbol-name element)) | ||
((consp element) (symbol-name (car element))) | ||
((listp element) (car element))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the third case will never trigger, because the only thing that satisfies listp
but not consp
is nil
. So I think this would break the existing case where you have a cons cell whose car is a string, because it would try to take symbol-name
of a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. I've fixed the ivy-prescient--elements-ensure
function implementation, which should be the right way. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ Looks good, thanks!
ivy doesn't convert all variables to string when sorting or calling
prescient-remember
, so it need to preprocess when work withivy-prescient.el
. if not, awrong-type-argument
error may occur.