Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
completing-read argument DEF as a symbol breaks #1526
There's a difference between the default behavior of
(completing-read "Q: " '(one two) nil nil nil nil 'one) ;; => no suggestions and empty "" on RET (completing-read-default "Q: " '(one two) nil nil nil nil 'one) ;; => Shows suggestions on tab and expected default value on RET
I've looked through open and closed issues and found some other issues about completing read, but not about this case so I opened a new one.
I couldn't find any specification of expected type in the default
Tested on master #da4236c with
My personal issue with this was with clj-refactor when adding missing libspec has multiple options, see line: https://github.com/clojure-emacs/clj-refactor.el/blob/ab081b26b92f6a1c7ebe8fb7ff9803d46b07ae84/clj-refactor.el#L2182
EDIT: I had submitted issue by accident with the return key, finished specifying.
Note that vanilla
(progn (push ?\C-m unread-command-events) (completing-read-default "" '("a" "b" "c") nil nil nil nil (current-buffer)))
returns a buffer object.