[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executing External Programs from Emacs
From: |
Pascal J. Bourguignon |
Subject: |
Re: Executing External Programs from Emacs |
Date: |
Sat, 14 Feb 2009 11:00:06 +0100 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) |
dstein64 <DStein64@gmail.com> writes:
> Are there any functions that can launch external programs (not just
> command line programs, but also GUI programs) from Emacs? I know that
> I can access a shell, and call a program from there, but then emacs is
> not operable until I close the program. Prepending the command with
> `nohup' is useful, but for some reason it does not work as expected
> with all programs, including emacs.
You should read: http://catb.org/esr/writings/taoup/html/
Pay particular attention to the chapter 11.
> I would prefer another way of
> doing this - using a specific built-in of emacs lisp if one exists.
> Any help would be greatly appreciated. Thanks.
(defun run-any-program (program &rest arguments)
(let ((output (get-buffer-create (format "*%s output*" (gensym program)))))
(shell-command (format "xterm -T \"Controlling terminal for %s\" -e %s %s
&"
(shell-quote-argument program)
(shell-quote-argument program)
(with-output-to-string
(dolist (arg arguments)
(princ (shell-quote-argument arg))
(princ " "))))
output output)))
(run-any-program "xclock")
(run-any-program "vim")
(run-any-program "emacs" "-q" "-nw")
(run-any-program "emacs" "-q")
--
__Pascal Bourguignon__
- Executing External Programs from Emacs, dstein64, 2009/02/14
- Re: Executing External Programs from Emacs, Nurullah Akkaya, 2009/02/14
- Re: Executing External Programs from Emacs,
Pascal J. Bourguignon <=
- Re: Executing External Programs from Emacs, Lennart Borgman, 2009/02/14
- Re: Executing External Programs from Emacs, Michael Albinus, 2009/02/14
- Re: Executing External Programs from Emacs, Xah Lee, 2009/02/14
- Re: Executing External Programs from Emacs, tyler, 2009/02/14
- Re: Executing External Programs from Emacs, Josef G. Bauer, 2009/02/16