[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Re: Using babel to generate a commit log
From: |
Luke Crook |
Subject: |
[O] Re: Using babel to generate a commit log |
Date: |
Wed, 30 Mar 2011 18:08:10 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Nick Dokos <nicholas.dokos <at> hp.com> writes:
>
> Luke Crook <luke <at> balooga.com> wrote:
>
> > Jambunathan K <kjambunathan <at> gmail.com> writes:
> >
> > >
> >
> > I changed my code to wait until the 'Git' process completes. Luckily "vc-
call-
> > backend" returns the async process.
> >
>
> ... or you could use a sentinel
>
> One bit of defensive programming might be to check that status *is* a
> process before you do the wait: vc-do-command returns a real status in
> the synchronous case, so if you cut-n-paste this code with some other
> command that does not use async, it'll blow up.
>
I have modified the code to only check the status if the process is actually
running;
(with-temp-buffer
(let ((status (vc-call-backend backend
'print-log
files
(current-buffer))))
(when (= 0 (process-exit-status status))
(while (not (eq 'exit (process-status status)))
(sit-for 1 t)))
I'm not sure about using a sentinel though as this is just a callback that is
executed when the process completes. Wouldn't the sentinel fire after the
source
block has returned?
Or do you mean to wait until a variable set by the sentinel returns t?
-Luke
Re: [O] Using babel to generate a commit log, Suvayu Ali, 2011/03/30
- [O] Re: Using babel to generate a commit log, Luke Crook, 2011/03/30
- Re: [O] Re: Using babel to generate a commit log, Nick Dokos, 2011/03/30
- [O] Re: Using babel to generate a commit log, Luke Crook, 2011/03/30
- Re: [O] Re: Using babel to generate a commit log, Nick Dokos, 2011/03/30
- [O] Re: Using babel to generate a commit log, Luke Crook, 2011/03/30
- [O] Re: Using babel to generate a commit log, Luke Crook, 2011/03/30
- Re: [O] Re: Using babel to generate a commit log, Eric Schulte, 2011/03/30
- Re: [O] Re: Using babel to generate a commit log, Nick Dokos, 2011/03/30