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

Completion after a close paren signals an error. #1540

Closed
Malabarba opened this issue Feb 4, 2016 · 0 comments
Closed

Completion after a close paren signals an error. #1540

Malabarba opened this issue Feb 4, 2016 · 0 comments
Labels

Comments

@Malabarba
Copy link
Member

If I place point after (inc 1), and try to trigger completion (tab, in my case) I get the following error.

Debugger entered--Lisp error: (error "Marker does not point anywhere")
  completion-in-region(#<marker in no buffer> nil #[771 "\211\242\302=\206\n�\211\303=?\2053�r\301\204��p\202(�\304 \305�!\203%�\306�!\202&�p\262�q\210\307�\300�!��$)\207" [cider-complete nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil)
  completion-at-point()
  indent-for-tab-command(nil)
  funcall-interactively(indent-for-tab-command nil)
  call-interactively(indent-for-tab-command nil nil)
  command-execute(indent-for-tab-command)

It seems to me this is because the following form inside the completion-at-point function

(run-hook-wrapped 'completion-at-point-functions
                  #'completion--capf-wrapper 'all)

returns a value like this (cider-complete-at-point nil nil ...). The elements 1 and 2 on this list are nil, but Emacs expects them to be integers or markers, and so the error is signaled.
IIRC, in a situation where CIDER can't do completion, then it should simply return nil, instead of returning an invalid list.

@bbatsov bbatsov added the bug label Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants