unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: jan <janmar@iprimus.com.au>
Subject: Re: Question to completion
Date: 09 Nov 2003 11:04:24 -0800	[thread overview]
Message-ID: <uy8up1hzb.fsf@iprimus.com.au> (raw)
In-Reply-To: <usmkzvx8p.fsf@sdm.de>

Klaus Berndl <klaus.berndl@sdm.de> writes:

> Suppose i have s command like follows:
> 
> (defun offer-some-choices ()
>   (interactive)
>   (completing-read "Select a name: " '(("Klaus" . t) ("Berndl" . t))))
> 
> Then this displays in the minibuffer "Select a name: " and then wait
> for input from the user.
> 
> How can i achieve that always - *without* the user has to hit TAB -
> the possible completions are displayed immediately?  Or with other
> words: How to simulate that the user has already pressed TAB as
> often as necessary to display all possible completions? Best would
> be if the longest common substring of all possible completions is
> displayed immediately in the minibuffer (OK, this i could precompute
> with `try-completion' and then insert as argument INITIAL-INPUT -
> but AFAIK this is deprecated?!).
> 
> But most important is that the user has not to hit any key to see
> all possible completions. How to do this with completing-read - or
> is there a better way to do this?
> 
> What i want is to (mis?)use the completion-feature of Emacs to offer
> the user some choices which he can select either via mouse or via
> keyboard from the minibuffer.

`icomplete-mode' might be a good starting point.

-- 
jan

  parent reply	other threads:[~2003-11-09 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-08 12:52 Question to completion Klaus Berndl
2003-11-08 14:14 ` Klaus Berndl
2003-11-09 14:36 ` Ehud Karni
2003-11-09 19:04 ` jan [this message]
     [not found] ` <mailman.73.1068392321.2005.help-gnu-emacs@gnu.org>
2003-11-09 17:21   ` Klaus Berndl
2003-11-10 16:20   ` Stefan Monnier

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=uy8up1hzb.fsf@iprimus.com.au \
    --to=janmar@iprimus.com.au \
    /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).