help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using ido-completions in other packages


From: Thierry Volpiatto
Subject: Re: Using ido-completions in other packages
Date: Fri, 04 Jun 2010 17:15:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Andrea Crotti <address@hidden> writes:

> Thierry Volpiatto <address@hidden> writes:
>>
>> I don't know what is senator-jump, but i guess this function use a
>> simple read-string. To have completion you need a *-completing-read with a
>> collection as arg.
>
> Here is the part of the code that I think is in charge for showing me
> the list of possibilities.
> It does use completing-read, but maybe using apply it doesn't work?
> (Just wild guessing).
>
>       (let*
>       ...
>          (completing-read-args
>           (list (if (and context (car context))
>                     (format "%s(default: %s) " prompt (car context))
>                   prompt)
>                 (setq senator-jump-completion-list
>                       (senator-completion-list in-context))
>                 nil
>                 require-match
>                 ""
>                 'semantic-read-symbol-history)))
>     (list
>      (apply #'completing-read
>             (if (and context (car context))
>                 (append completing-read-args context)
>               completing-read-args))
>      in-context no-default)))
>

Try that:

copy/paste the function senator-jump in your .emacs and replace
(apply #'completing-read
by
(apply #'ido-completing-read

That will give you ido completion, but if 
(senator-completion-list in-context) return nothing (nil)
the problem come from here.

To know that, use C-u C-M x on the function senator-jump and use it,
and then use "n" to step throught the code.

Do you have completion with the original code?(i.e using
completing-read)

--
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]