From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Using ido-completions in other packages Date: Fri, 04 Jun 2010 17:15:59 +0200 Organization: ThierryVolpiatto Message-ID: <87eigm4ymo.fsf@tux.homenetwork> References: <87hbljqd4h.fsf@thinkpad.tsdh.de> <87r5kndmso.fsf@gmail.com> <87pr073po8.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1275666110 17241 80.91.229.12 (4 Jun 2010 15:41:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Jun 2010 15:41:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 04 17:41:46 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OKZ1k-0007vD-RM for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Jun 2010 17:41:45 +0200 Original-Received: from localhost ([127.0.0.1]:44732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKYhX-0004hB-D2 for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Jun 2010 11:20:51 -0400 Original-Received: from [140.186.70.92] (port=59221 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKYgE-0004d6-51 for help-gnu-emacs@gnu.org; Fri, 04 Jun 2010 11:19:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKYgA-0005zL-JD for help-gnu-emacs@gnu.org; Fri, 04 Jun 2010 11:19:27 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:43657) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKYgA-0005yz-88 for help-gnu-emacs@gnu.org; Fri, 04 Jun 2010 11:19:26 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OKYg7-00054b-2P for help-gnu-emacs@gnu.org; Fri, 04 Jun 2010 17:19:23 +0200 Original-Received: from 171.78.88-79.rev.gaoland.net ([79.88.78.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Jun 2010 17:19:23 +0200 Original-Received: from thierry.volpiatto by 171.78.88-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Jun 2010 17:19:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 53 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 171.78.88-79.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:LgRUrjgjiLjU58UT6COejrgCKzY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73829 Archived-At: Andrea Crotti writes: > Thierry Volpiatto 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/