From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt Price Newsgroups: gmane.emacs.help Subject: Re: starting an external command from emacs Date: Fri, 14 Nov 2008 10:33:34 -0500 Organization: History Department, University of Toronto Message-ID: <1226676814.4606.27.camel@localhost> References: <3d16ac18-967c-4511-8c9c-9a80c40c3d8e@x16g2000prn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1226676875 29504 80.91.229.12 (14 Nov 2008 15:34:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2008 15:34:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 14 16:35:36 2008 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 1L10hh-0001nr-46 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2008 16:35:25 +0100 Original-Received: from localhost ([127.0.0.1]:41808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L10gY-00036L-Uk for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2008 10:34:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L10gF-00035m-9K for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 10:33:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L10gE-00035W-Fu for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 10:33:54 -0500 Original-Received: from [199.232.76.173] (port=40221 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L10gE-00035T-BZ for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 10:33:54 -0500 Original-Received: from bureau60.ns.utoronto.ca ([128.100.132.147]:41845) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L10gE-00047c-Gd for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 10:33:54 -0500 Original-Received: from anarres.mercey.org (CPE001d7e1d5798-CM0014f8cd1c4c.cpe.net.cable.rogers.com [173.32.83.31]) (authenticated bits=0) by bureau60.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id mAEFXcKI025275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 14 Nov 2008 10:33:47 -0500 Original-Received: by anarres.mercey.org (Postfix, from userid 1000) id 25DA7120352; Fri, 14 Nov 2008 10:33:36 -0500 (EST) In-Reply-To: <3d16ac18-967c-4511-8c9c-9a80c40c3d8e@x16g2000prn.googlegroups.com> X-Mailer: Evolution 2.24.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:59792 Archived-At: On Thu, 2008-11-13 at 07:50 -0800, Xah wrote: > if you want to write elisp to call some other script and process the > result, it's fairly easy. If you can be specific about what command > you want to call and how you want to parse the result, we can help > better. here's my second question:=20 given a list like this '( "matt@mdke.org Matthew East" "matt.price@utoronto.ca Matt Price "matthias.doerries@gersulp.u-strasbg.fr Matthias D=C3=B6rries" "matthewreedy@yahoo.com matthewreedy" ) how to i tell emacs i want to use the list elements as choices for tab-completion in an interactive function? so if i have a function like this: (defun query-python-addressbook (name) (interactive "s To:" ) (setq cmd-name "python /home/matt/evo-query.py") ;; imagine sh-output generates a list -- see my last email in this thread (setq sh-output (shell-command-to-string (concat cmd-name " " name))) ) can I write another couple of lines that presents the items in the list as choices to the user, who then picks one? that'd be really great. =20 that's about as far as i can get so far. thanks again! matt --=20 Matt Price matt.price@utoronto.ca