all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Antoine Levitt <antoine.levitt@gmail.com>
To: Dan Nicolaescu <dann@gnu.org>
Cc: , Ken Raeburn <raeburn@raeburn.org>, emacs-devel@gnu.org
Subject: Re: Async commands in M-x compile
Date: Thu, 01 Jul 2010 01:02:04 +0200	[thread overview]
Message-ID: <87hbkkruoj.fsf@gmail.com> (raw)
In-Reply-To: <yxqtyoki11k.fsf@fencepost.gnu.org> (Dan Nicolaescu's message of "Wed, 30 Jun 2010 18:54:47 -0400")

Dan Nicolaescu <dann@gnu.org> writes:

> Antoine Levitt <antoine.levitt@gmail.com> writes:
>
>> Dan Nicolaescu <dann@gnu.org> writes:
>>
>>> Antoine Levitt <antoine.levitt@gmail.com> writes:
>>>
>>>> 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 &)
>>>
>>> Have you tried AUCTeX?  It should be able to do this by default ...
>>> Alternatively, you can use the infrastructure in tex.el to accomplish
>>> what you want.
>>
>> I used to use AUCTeX, but there is a number of things it doesn't do (at
>> least, not without extensive coding, which I'm not prepared to
>> do). 
>
> Ask the AUCTeX list, using your preferred command should be one or two
> lines of code, or just customization.

Yes, except I'd have to adjust the output to check for errors in a
format auctex expects, etc. I'm very happy with compilation, thank you
very much. Using auctex would be of no benefit here.

>
>> Rubber checks for dependencies (including \input and
>> \includegraphics), runs bibtex, and runs the right amount of times, all
>> in one run. It also produces clean error output, which is something that
>> has bugged me with AUCTeX. It's true that AUCTeX is able to run viewers
>> etc, but I'm looking for a one-command solution, which I achieved with
>> this shell line.
>
> Then just run that command using one of the methods that were shown in
> this thread.



  reply	other threads:[~2010-06-30 23:02 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
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 [this message]
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=87hbkkruoj.fsf@gmail.com \
    --to=antoine.levitt@gmail.com \
    --cc=dann@gnu.org \
    --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.