[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: waiting for asynchronous processes

From: Štěpán Němec
Subject: Re: waiting for asynchronous processes
Date: Sun, 16 Oct 2011 03:15:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

On Sun, 16 Oct 2011 02:17:03 +0200
Perry Smith wrote:

> Well, as I said, what I really wanted to use is "grep" (the built in emacs 
> function).  
> I assumed I couldn't reach in and change him from asynchronous to synchronous 
> -- can I?

I don't think you can, indeed. `grep' uses `compilation-start', which
only starts a synchronous process when asynchronous processes are not

Depending on what exactly it is you're after, it might be better to just
define your own command, or try to modify the sentinel of the grep
process (the `grep' command returns the compilation buffer; you can get
at the associated process and its sentinel using the usual functions),
which, when done cleanly, would actually require defining another
command, too.

Looking at `compilation-handle-exit', even the default sentinel provides
several hooks for customising what happens when the process finishes,
namely `compilation-exit-message-function' and
`compilation-finish-function(s)', so just using (one of) these variables
might be sufficient for your needs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]