* Load other program from emacs
@ 2003-11-05 7:32 Li Chen
2003-11-05 9:08 ` Joakim Hove
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Li Chen @ 2003-11-05 7:32 UTC (permalink / raw)
Is there any method which can load other programs within emacs and
return the control to emacs immediately instead leave emacs waiting
until that program was ended?
I can invoke a program within emacs using shell command and shell buffer,
however, both of them lock the emacs and wait for the end of invoked
program.
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Load other program from emacs
2003-11-05 7:32 Load other program from emacs Li Chen
@ 2003-11-05 9:08 ` Joakim Hove
2003-11-06 2:03 ` Richard
2003-11-05 10:47 ` Thien-Thi Nguyen
2003-11-05 15:57 ` Barry Margolin
2 siblings, 1 reply; 6+ messages in thread
From: Joakim Hove @ 2003-11-05 9:08 UTC (permalink / raw)
Li Chen <cli2@student.monash.edu.au> writes:
> Is there any method which can load other programs within emacs and
> return the control to emacs immediately instead leave emacs waiting
> until that program was ended?
C-h f shell-command:
shell-command is an interactive compiled Lisp function in `simple'.
(shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)
Execute string COMMAND in inferior shell; display output, if any.
With prefix argument, insert the COMMAND's output at point.
If COMMAND ends in ampersand, execute it asynchronously.
The output appears in the buffer `*Async Shell Command*'.
That buffer is in shell mode.
...
...
So, adding an "&" at the end of the command should do the trick?
HTH - Joakim
--
/--------------------------------------------------------------------\
/ Joakim Hove / hove@bccs.no / (55 5) 84076 | \
| Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
| CMU | 5231 Paradis |
\ Thormøhlensgt.55, 5020 Bergen. | 55 91 28 18 /
\--------------------------------------------------------------------/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Load other program from emacs
2003-11-05 7:32 Load other program from emacs Li Chen
2003-11-05 9:08 ` Joakim Hove
@ 2003-11-05 10:47 ` Thien-Thi Nguyen
2003-11-05 15:57 ` Barry Margolin
2 siblings, 0 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2003-11-05 10:47 UTC (permalink / raw)
Li Chen <cli2@student.monash.edu.au> writes:
> Is there any method which can load other programs within emacs and
> return the control to emacs immediately instead leave emacs waiting
> until that program was ended?
check out `M-x compile'.
thi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Load other program from emacs
2003-11-05 7:32 Load other program from emacs Li Chen
2003-11-05 9:08 ` Joakim Hove
2003-11-05 10:47 ` Thien-Thi Nguyen
@ 2003-11-05 15:57 ` Barry Margolin
2 siblings, 0 replies; 6+ messages in thread
From: Barry Margolin @ 2003-11-05 15:57 UTC (permalink / raw)
In article <Pine.WNT.4.58.0311051827170.2388@NingNing>,
Li Chen <cli2@student.monash.edu.au> wrote:
>Is there any method which can load other programs within emacs and
>return the control to emacs immediately instead leave emacs waiting
>until that program was ended?
>
>I can invoke a program within emacs using shell command and shell buffer,
>however, both of them lock the emacs and wait for the end of invoked
>program.
If you end the command line with "&", the command will be run in the
background and control will return immediately, just as in an ordinary
shell.
--
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Load other program from emacs
2003-11-05 9:08 ` Joakim Hove
@ 2003-11-06 2:03 ` Richard
2003-11-06 18:20 ` Kevin Rodgers
0 siblings, 1 reply; 6+ messages in thread
From: Richard @ 2003-11-06 2:03 UTC (permalink / raw)
Thanks a lot! It workds very well except a buffer call 'Async Shell
Command' popup. It not a problem, but if any method can hide it
automatically will make things better.
Richard
Joakim Hove <hove@bccs.no> wrote in message news:<4yk76fkws3.fsf@skjellgran.ii.uib.no>...
> Li Chen <cli2@student.monash.edu.au> writes:
>
> > Is there any method which can load other programs within emacs and
> > return the control to emacs immediately instead leave emacs waiting
> > until that program was ended?
>
> C-h f shell-command:
>
>
> shell-command is an interactive compiled Lisp function in `simple'.
> (shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)
>
> Execute string COMMAND in inferior shell; display output, if any.
> With prefix argument, insert the COMMAND's output at point.
>
> If COMMAND ends in ampersand, execute it asynchronously.
> The output appears in the buffer `*Async Shell Command*'.
> That buffer is in shell mode.
> ...
> ...
>
> So, adding an "&" at the end of the command should do the trick?
>
> HTH - Joakim
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Load other program from emacs
2003-11-06 2:03 ` Richard
@ 2003-11-06 18:20 ` Kevin Rodgers
0 siblings, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2003-11-06 18:20 UTC (permalink / raw)
[Please don't top-post.]
Richard wrote:
> Thanks a lot! It workds very well except a buffer call 'Async Shell
> Command' popup. It not a problem, but if any method can hide it
> automatically will make things better.
(defadvice display-buffer (around async-shell-command activate)
"If BUFFER is named *Async Shell Command*, don't display it."
(or (and (bufferp (ad-get-arg 0))
(equal (buffer-name (ad-get-arg 0)) "*Async Shell Command*"))
ad-do-it))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-06 18:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-05 7:32 Load other program from emacs Li Chen
2003-11-05 9:08 ` Joakim Hove
2003-11-06 2:03 ` Richard
2003-11-06 18:20 ` Kevin Rodgers
2003-11-05 10:47 ` Thien-Thi Nguyen
2003-11-05 15:57 ` Barry Margolin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).