Skip to content
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

completing-read on non-string inputs raises wrong-type-argument error #73

Open
martenlienen opened this issue Oct 25, 2020 · 2 comments

Comments

@martenlienen
Copy link

Hi,
the following code produces a (wrong-type-argument sequencep gpu) with ivy and prescient.

(let ((candidates '((default "julia") (remote "ssh"))))
  (completing-read "julia binary" candidates))

The problem is that
https://github.com/raxod502/prescient.el/blob/47fef02cc32b1fcd8ca97ec801572f5ba91a1a2a/prescient.el#L475-L476
assumes that the candidates are strings or something that you can call length on. This precludes prescient from working on integer or symbol candidates. One simple fix would be to convert all candidates to strings but since the code seems to be quite performance-optimized that may be unacceptable.

Best,
Marten

@raxod502
Copy link
Member

That sounds like a bug in Ivy, it should be converting candidates to strings before passing them to the sort function. Selectrum does not have this problem.

@raxod502
Copy link
Member

I can reproduce your problem though, to be clear. See #65.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants