help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: starting an external command from emacs


From: Andreas Politz
Subject: Re: starting an external command from emacs
Date: Fri, 14 Nov 2008 21:31:42 +0100
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]