I want to do a completing read with the
*Completions* buffer already shown (because I'm providing initial input that I already know is an ambiguous prefix). How can I do it?
I don't see an option for this in
completing-read. I want a method that works in both Emacs 23 (where
completing-read is defined in C) and in Emacs 24 (where
completing-read relays to the function indicated by the variable
completing-read-function, so I suppose I could just change that) — of course a solution based on
(if (boundp 'completing-read-function)) is fine.
Although my immediate use case is with a known ambiguous initial input, something that works regardless of that would be nice. Also, if the user has overridden the default read mechanism (e.g. by redefining
completing-read to invoke
anything-completing-read or by turning on Icicles or Helm), I'd like my code to achieve the same effect, i.e. start the completion mechanism with the list of completions already shown.