help-gnu-emacs
[Top][All Lists]
Advanced

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

Checking Process Status


From: CarlC
Subject: Checking Process Status
Date: Mon, 03 Feb 2003 14:53:36 GMT

I am trying to make "compile" synchronous. I am defining a function that
does a compile and looks at the *compilation* buffer. I need to wait until
the compile is finished before looking at this buffer. I think that my
problem is not knowing how to check the return of process-status. If I do
(setq stat (process-status "compilation")) right after the compile, it gets
set to a value "run". I don't know if this is a string or other type of
value. These are a couple of things that I have tried:

(while (equal (process-status "compilation") "run") (sleep-for .5))

(while (process-status "compilation") (sleep-for .5))

The first one fails the first time through, before the compile has finished.
The second one never finishes until I C-g, even though (process-status
"compilation") seems to return nil after the compilation finishes.

Does anybody have an idea of what I need to do here? Or is there a better
way of accomplishing this. The compiles normally take a fraction of a second
to complete, so this isn't going to cause the user any problem to have emacs
wait. I would hate to hardcode a delay. Thanks.




reply via email to

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