all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Antoine Levitt <antoine.levitt@gmail.com>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: , emacs-devel@gnu.org
Subject: Re: Async commands in M-x compile
Date: Wed, 30 Jun 2010 11:58:06 +0200	[thread overview]
Message-ID: <87k4pgkfkh.fsf@gmail.com> (raw)
In-Reply-To: <FAF0E56E-ECA5-4D99-9997-BB6B29ACF607@raeburn.org> (Ken Raeburn's message of "Tue, 29 Jun 2010 23:20:14 -0400")

Ken Raeburn <raeburn@raeburn.org> writes:

> 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.

Yes, I would completely agree with that, except it _doesn't_ start the
program. Try running "xclock &"

>
>> 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 "&".

Well, to be fair, I'm actually using compilation for another purpose
than what it was built for. I want to perform the action "compile latex,
if there is already a viewer, bring it to the front, if not, run one",
ie,

rubber -d main && (wmctrl -a main.pdf || gnome-open main.pdf &)

But the last bit does not work, ie it doesn't run the viewer, the same
as when I do "xclock &", which just silently returns success without
starting the program, and I don't understand this behaviour.

>
> Ken



  reply	other threads:[~2010-06-30  9:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 22:43 Async commands in M-x compile Antoine Levitt
2010-06-30  3:20 ` Ken Raeburn
2010-06-30  9:58   ` Antoine Levitt [this message]
2010-06-30 22:36     ` Dan Nicolaescu
2010-06-30 22:47       ` Antoine Levitt
2010-06-30 22:54         ` Dan Nicolaescu
2010-06-30 23:02           ` Antoine Levitt
2010-06-30 23:57     ` Giorgos Keramidas
2010-06-30  9:25 ` Thien-Thi Nguyen
2010-06-30 10:01   ` Antoine Levitt
2010-06-30 19:14     ` Thien-Thi Nguyen
2010-06-30 19:30       ` Antoine Levitt
2010-06-30 21:20         ` Thien-Thi Nguyen
2010-06-30 21:51         ` Andreas Schwab
2010-06-30 22:23           ` Antoine Levitt
2010-07-01  1:30           ` Stefan Monnier
2010-07-01  7:46             ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4pgkfkh.fsf@gmail.com \
    --to=antoine.levitt@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=raeburn@raeburn.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.