Stephen Leake <[EMAIL PROTECTED]> writes:

> Michael Olson <[EMAIL PROTECTED]> writes:
>
>> Stephen Leake <[EMAIL PROTECTED]> writes:
>>
>>> ido-completing-read appears to be broken as called from
>>> dvc-current-active-dvc.
>>>
>>> Try this:
>>>
>>> (ido-completing-read "back-end: " '("bzr" "xmtn"))
>>
>> That should be:
>>
>> (ido-completing-read "back-end: " '(("bzr") ("xmtn")))
>>

Both variants should work. And they work on my system.

There is a problem with ido-mode. ido-completing-read does only work,
when ido-mode is initialized somehow.

I use the following in my .emacs:

(ido-mode 'buffer)
(setq ido-enable-flex-matching t)



> Hmm. The doc string for ido-completing-read in Gnu Emacs 22 says:
>
>     Ido replacement for the built-in `completing-read'.
>     Read a string in the minibuffer with ido-style completion.
>     prompt is a string to prompt with; normally it ends in a colon and a 
> space.
>     choices is a list of strings which are the possible completions.
>
> Which says '("bzr" "xmtn") is acceptable.
>
> The doc string for completing-read also says a list of strings is
> acceptable.
>
>> completing-read on Emacs21 will also complain if each of these elements
>> are not lists in themselves.
>
> So we have a version incompatibility. Sigh. The actual use in
> dvc-current-active-dvc is Emacs 21 compatible, fortunately.
>
> (Aside; given the other thread on compatibility, does this mean we
> should have dvc-completing-read reimplement completing-read? I hope not :)
>
> (Aside 2: it would be nice if ido provided a way to choose either ido
> or the standard completing-read itself, so we don't have to)
>
> (Aside 3: Since this was introduced as part of a cleanup for XEmacs, I
> gather XEmacs doesn't have ido, so dvc-completing-read is provided
> really as an XEmacs compatibility function? If so, it belongs in
> dvc-xemacs.el).
>
> In any case, ido-completing-read is still broken for me in Emacs 22 (I
> haven't tested it in Emacs 21).
>
> The behavior I'm seeing:
>
> Invoke the above (either version).
>
> Type 'b' <RET>
>
>     The minibuffer shows two lines, the first containing the prompt,
>     the second a blank line.
>
> Type <C-g>
>
>     beep, and 'Quit' shows momentarily in the minibuffer, but no
>     change in focus or minibuffer display.
>
> I have to invoke another command that uses the minibuffer to clear it.
>
> If I run 
>
> (completing-read "back-end: " '(("bzr") ("xmtn")))
>
> I get "b" as the result after typing <RET>
>
>
> I'm running:
>
>     GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE.
>
> ido-completing-read is defined in emacs-22.1/lisp/ido.el (I checked, in case
> it was actually being overwritten by some nefarious other package).

See my initialization code above to make ido-completing work for you.

I really like the ido-completion much more than the standard
completion mechanism. This is the reason why I introduced a
package-completing-read variable in almost all of my packages.
So it is no compatibility setting. It is a setting that should allow a
better user experience.

I asked Kim F. Storm (the author of ido-mode) if he could fix the
initialization problem of ido-completing-read. He agreed that there is
a bug but he also mentioned that this bug is hard to fix.



Stefan.

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to