From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.help Subject: Re: starting an external command from emacs Date: Fri, 14 Nov 2008 21:31:42 +0100 Organization: FH-Trier Message-ID: <1226694772.527988@arno.fh-trier.de> 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; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1226695255 2791 80.91.229.12 (14 Nov 2008 20:40:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2008 20:40:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 14 21:41:56 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 1L15UA-0007jH-Lo for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2008 21:41:46 +0100 Original-Received: from localhost ([127.0.0.1]:38484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L15T2-0006cr-Hw for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2008 15:40:36 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.tu-darmstadt.de!news.belwue.de!news.uni-kl.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 143-93-54-11.arno.fh-trier.de Original-X-Trace: news.uni-kl.de 1226694807 25993 143.93.54.11 (14 Nov 2008 20:33:27 GMT) Original-X-Complaints-To: usenet@news.uni-kl.de Original-NNTP-Posting-Date: Fri, 14 Nov 2008 20:33:27 +0000 (UTC) User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) In-Reply-To: Cache-Post-Path: arno.fh-trier.de!unknown@dslb-084-059-123-215.pools.arcor-ip.net X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) Original-Xref: news.stanford.edu gnu.emacs.help:164468 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:59800 Archived-At: Matt Price wrote: > 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: > > given a list like this > '( > "matt@mdke.org Matthew East" > "matt.price@utoronto.ca Matt Price > "matthias.doerries@gersulp.u-strasbg.fr Matthias Dörries" > "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:" ) (interactive (list (completing-read "Name : " ;;or ido-completing-read '("your" "list") nil t))) > (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. > > that's about as far as i can get so far. thanks again! > > matt > -ap