From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Help with completing-read
Date: Thu, 20 Jan 2011 14:19:30 -0500 [thread overview]
Message-ID: <jwv4o93v14o.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.2.1295535257.22543.help-gnu-emacs@gnu.org
> 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
next parent reply other threads:[~2011-01-20 19:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2.1295535257.22543.help-gnu-emacs@gnu.org>
2011-01-20 19:19 ` Stefan Monnier [this message]
2011-01-20 20:03 ` Help with completing-read Perry Smith
2011-01-20 14:16 Perry Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4o93v14o.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).