bug#3662: Possible problem with ido-completing-read

Stephen Berman <[email protected]>
Newsgroups gmane.emacs.bugs,gmane.emacs.pretest.bugs
Message-ID <[email protected]>
On Wed, 24 Jun 2009 07:37:42 +1000 Peter Milliken <[email protected]> wrote:

> This bug is also present in Emacs 22.3. I am attempting to use
> ido-completing-read in a defun and the function "hangs" at the prompt
> i.e. it does no completion at all, it will not allow me to cancel the
> command, or accept a string typed in followed by RET.
>
> I have produced a small test function to attempt to minimise possible
> problems on my part:
>
> (defun test ()
>   (interactive)
>   (let ((a)(d)) 
>     (setq d '("abc" "xyz" "abe" "def"))
>     (setq a (ido-completing-read "prompt: " d))))
>
> My *understanding* of reading the defun documentation is that I should
> be able to type "a<TAB>" (at the prompt) and have a completion list of
> "abc" and "abe" offered. But this does not happen, all I get is "a
> TAB". If I hit C-g nothing happens, the prompt line remains at the
> command line.

I get this behavior as well (with GNU Emacs 23.1.50.1
(i686-pc-linux-gnu, GTK+ Version 2.14.4) of 2009-06-23 on escher).
However, if I add `(ido-mode 1)' before the first setq, then it works as
I assume it's supposed to: typing `M-x test' shows "prompt: {abc | xyz |
abe | def}" in the minibuffer, and then typing `a' (without subsequent
TAB) shows "prompt: a[b] {abc | abe}", and `C-g' quits the minibuffer.

Steve Berman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.