From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Help with completing-read Date: Thu, 20 Jan 2011 14:19:30 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1295553402 27361 80.91.229.12 (20 Jan 2011 19:56:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2011 19:56:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 20 20:56:38 2011 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 1Pg0cV-0006Ah-S8 for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jan 2011 20:56:36 +0100 Original-Received: from localhost ([127.0.0.1]:35918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pg0Nc-0001Wy-4k for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jan 2011 14:41:12 -0500 Original-Path: usenet.stanford.edu!newsfeed.esat.net!feeder.news.heanet.ie!news.buerger.net!newsfeed.datemas.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Injection-Info: mx02.eternal-september.org; posting-host="4IZ3yIHoQdnGHfrgR3wu6A"; logging-data="27779"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190MTox34Vdjg2st5kkv3GZ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:P/UTN1j8yaXCQomdKUW5IYmQ8F4= sha1:XzipJ1v2msS6T2IO6DaWWfdyD+E= Original-Xref: usenet.stanford.edu gnu.emacs.help:184450 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:78611 Archived-At: > The software I'm working on is doing this: > (let ((completing-read-func (if (null ido-mode) > 'completing-read > 'ido-completing-read))) > (setq ri-topic (or ri-topic > (funcall completing-read-func > "yari: " > (yari-ruby-obarray rehash) > nil > t > (yari-symbol-at-point))))) > The obarray has a list of methods with their complete class path like > ActiveRecord::ConnectionAdapters::SchemaStatements#create_table > What I'd like to be able to do is allow the user to just type > create_table and then have a list of completions which would be the > full class paths of for those classes that have a create_table method. I'm not sure I understand the details of what you're asking for (e.g. what part of the name do you want to list as completion, and where do you want it to be listed). Does ido-completing-read already do what you want? If not, why not? The default completion code provides a `substring' completion style in Emacs-24 (not provided in Emacs-23) and it sounds close to what you want, but OTOH ido-completing-read also provides it, so maybe you want some else. Or do you want something more like what filecache.el provides? Stefan