From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: tab completion for a custom function. Date: Tue, 3 Feb 2009 07:09:17 -0800 Message-ID: <006b01c98611$65547690$0200a8c0@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233674122 626 80.91.229.12 (3 Feb 2009 15:15:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2009 15:15:22 +0000 (UTC) To: "'Nurullah Akkaya'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 03 16:16:35 2009 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.50) id 1LUN0K-0000aL-U9 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Feb 2009 16:16:01 +0100 Original-Received: from localhost ([127.0.0.1]:47345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUMz2-00074T-3j for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Feb 2009 10:14:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUMu6-00059I-Iz for help-gnu-emacs@gnu.org; Tue, 03 Feb 2009 10:09:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUMu4-00058D-7m for help-gnu-emacs@gnu.org; Tue, 03 Feb 2009 10:09:33 -0500 Original-Received: from [199.232.76.173] (port=44179 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUMu3-000588-To for help-gnu-emacs@gnu.org; Tue, 03 Feb 2009 10:09:31 -0500 Original-Received: from rcsinet13.oracle.com ([148.87.113.125]:33436 helo=rgminet13.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUMu3-0004Wb-6R for help-gnu-emacs@gnu.org; Tue, 03 Feb 2009 10:09:31 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n13FALcn013757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 Feb 2009 15:10:22 GMT Original-Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n13F9OHJ022326; Tue, 3 Feb 2009 15:09:26 GMT Original-Received: from dradamslap1 (/141.144.67.90) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Feb 2009 07:09:22 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcmF91ebWjyRqf7rQHSEv5PsohrvXAAGYMbQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt704.oracle.com [141.146.40.82] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.49885E25.00F3:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:61873 Archived-At: > i have a custom function that gets input a project name then > it opens projects main file and two terminal's in to project > directories. i get the input using (interactive "sProject: ") > i want to use tab completion for project names. instead of > typing the whole name. can i supply a list of names to the > interactive function? No. But you can use Lisp code other than a string in the argument to `interactive'. The code should return the list of the arguments. The code can call `completing-read' to read user input with completion. (interactive (list (completing-read "Project: " (my-list-of-projects) ...)))