From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jan Newsgroups: gmane.emacs.help Subject: Re: Question to completion Date: 09 Nov 2003 11:04:24 -0800 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068336389 9861 80.91.224.253 (9 Nov 2003 00:06:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 Nov 2003 00:06:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 09 01:06:28 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AId63-0002pd-00 for ; Sun, 09 Nov 2003 01:06:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AIdzQ-0004rG-JG for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Nov 2003 20:03:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AIdzE-0004qv-V7 for help-gnu-emacs@gnu.org; Sat, 08 Nov 2003 20:03:28 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AIdyi-0004pE-2x for help-gnu-emacs@gnu.org; Sat, 08 Nov 2003 20:03:27 -0500 Original-Received: from [210.50.76.52] (helo=smtp02.syd.iprimus.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AIdyh-0004p8-L9 for help-gnu-emacs@gnu.org; Sat, 08 Nov 2003 20:02:55 -0500 Original-Received: from ABE (210.50.172.177) by smtp02.syd.iprimus.net.au (7.0.020) id 3F8F522A0078F30E for help-gnu-emacs@gnu.org; Sun, 9 Nov 2003 11:01:27 +1100 Original-To: help-gnu-emacs@gnu.org In-Reply-To: Original-Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13965 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13965 Klaus Berndl 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