[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Async commands in M-x compile
From: |
Ken Raeburn |
Subject: |
Re: Async commands in M-x compile |
Date: |
Tue, 29 Jun 2010 23:20:14 -0400 |
On Jun 29, 2010, at 18:43, Antoine Levitt wrote:
> Hello,
>
> Can someone explain to me why compile doesn't support asynchroneous
> commands, and especially why it silently fails instead of displaying an
> error message? I don't understand the mechanism involved here.
The program run -- the shell -- exits (after having started some other program
in background). The compilation command has finished, and exited with an exit
status that indicates success. So, you're done. I could argue that it
"succeeded", though apparently not at doing whatever it is that you think it
should do.
> As a test, try M-x compile with "echo test > ~/test &" or "xclock &".
Why would you need something like that? Compilation mode already lets you
continue doing stuff in Emacs while the compilation runs. And you can use
something like "make -j" to run multiple tasks in parallel, without losing
track of the exit statuses of subprocesses, like you would with "&".
If you're not actually trying to do compilation, but just run some task in
background without monitoring its progress or parsing error messages after
failure, there's shell-mode, or you can give shell-command (M-!) a command
ending with "&".
Ken
Re: Async commands in M-x compile, Thien-Thi Nguyen, 2010/06/30