[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: waiting for asynchronous processes
From: |
Perry Smith |
Subject: |
Re: waiting for asynchronous processes |
Date: |
Sat, 15 Oct 2011 20:49:51 -0500 |
On Oct 15, 2011, at 8:15 PM, Štěpán Němec wrote:
> 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
> available.
>
> 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.
Thanks.
One more question, not sure how to ask it.
I was hooking this into a keyboard macro so I basically wanted to "do nothing"
while I waited for the process to complete. What is the proper way to "do
nothing" in emacs?
Thanks
pedz