From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Help with completing-read Date: Thu, 20 Jan 2011 08:16:09 -0600 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1295535304 19840 80.91.229.12 (20 Jan 2011 14:55:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2011 14:55:04 +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 15:55:00 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 1Pfvub-0001pH-06 for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jan 2011 15:54:57 +0100 Original-Received: from localhost ([127.0.0.1]:46716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pfvua-0002Ah-I9 for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Jan 2011 09:54:56 -0500 Original-Received: from [140.186.70.92] (port=44165 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfvJ6-0001i6-Rw for help-gnu-emacs@gnu.org; Thu, 20 Jan 2011 09:16:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfvJ5-0008KD-Pz for help-gnu-emacs@gnu.org; Thu, 20 Jan 2011 09:16:12 -0500 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:47379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfvJ5-0008Jx-Ja for help-gnu-emacs@gnu.org; Thu, 20 Jan 2011 09:16:11 -0500 Original-Received: by vws10 with SMTP id 10so173482vws.0 for ; Thu, 20 Jan 2011 06:16:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:content-type:content-transfer-encoding :subject:date:message-id:to:mime-version:x-mailer; bh=L3pmrEGOuLa7QZC1i6GRJJ14bCGZCeqhOYx/4tWXTic=; b=aISQtK60CstEvI6xi/fAw+EoB0AFYOc/2F2wMB2y8qSGR6TNNlpODOU0UDp8hdwlll BrUV4bjj2O6xyzHXv9LSooZ0GHuOxub6WVZFq3GQET6XNa49frJOnHQYhLh4G5MYnXdL u9MsHEgv9xiqlMA/5oDAb0hwMLQxsDjs+2oh8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=Y9M/uCiZDcFVDQp/l3dRjOhMngSlGZT4fGX3AlAm+4zaUhINUlZvS3yoFvehkjLwuF Zp7T+kmDEBl1AyguJi3gnGl7+WT1hkcLv1BqUGqTsWqWLySI5x/5dXq6iV5MvowA5HE8 j+q+q9W3GOZ1frp+MRHTY0TOBm5YhNbx4MoZs= Original-Received: by 10.220.176.12 with SMTP id bc12mr567597vcb.55.1295532970967; Thu, 20 Jan 2011 06:16:10 -0800 (PST) Original-Received: from [10.0.0.2] ([64.128.19.234]) by mx.google.com with ESMTPS id b26sm4851493vby.3.2011.01.20.06.16.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 20 Jan 2011 06:16:10 -0800 (PST) X-Mailer: Apple Mail (2.1082) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Thu, 20 Jan 2011 09:54:15 -0500 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:78608 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=20 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. What is the least painful way to do this? I'm sorta ok competent with = emacs lisp but its not my strongest suit. Thank you for your time, Perry