Improper use of require-match in completing-read functions #12
Comments
Thanks for opening the issue. I don't use IDO anymore, now I use (funcall ebal-completing-read-function
"Build target: "
(cons "default" ebal--project-targets)
nil
t) and (funcall ebal-completing-read-function
"Build target: "
(cons "default" ebal--project-targets)
nil
t
nil
nil
"default") In both cases I'm forced to select something. And what on the earth does it mean "if the input is null"? Null is not
Right, I'm actually dropping dependency on |
In this case, "null" input means the user has not entered any text, i.e. the empty string. You can test this for yourself. Run It's not surprising that you don't see an issue when using ivy, since ivy doesn't follow the documented behavior of Also, in #13, rather than removing them, you might want to define |
I am the author of ido-compelting-read+, and I recently received a bug report about an interaction between ebal and the latest version of my package: DarwinAwardWinner/ido-completing-read-plus#127. The problem stems from the fact that the
require-match
argument tocompleting-read
doesn't actually mean what it says. From the docstring ofcompleting-read
(emphasis mine):In other words, the default value for DEF is effectively
""
, which means that if you don't provide your own value for DEF, the empty string is considered a valid completion. From the issue referenced above and my reading of the code, this does not appear to be the intent for ebal. To solve this, you should pass(car collection)
as the default to anycompleting-read
-type function (or(car (all-completions "" collection))
if collection is not already a list.In addition, I don't think there's any need for your package to provide explicit support for ido completion. If users set
ebal-completing-read-function
to the default ofebal-built-in-completing-read
and enableido-ubiquitous-mode
, they will already get ido completion in ebal and everywhere else. The main reason to provide a separate ido-based completing-read function for your package would be if you think that people will want ido completion for your package but not anywhere else (or vice versa), which I think is unlikely, since people would generally either want it everywhere or nowhere for consistency.The text was updated successfully, but these errors were encountered: