[Top][All Lists]

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

Re: [O] babel completion notification

From: Nick Dokos
Subject: Re: [O] babel completion notification
Date: Mon, 17 Mar 2014 22:44:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eric Schulte <address@hidden> writes:

> Nick Dokos <address@hidden> writes:
>> (popup.py is my homemade notifier)
> Try adding `(lambda () (shell-command-to-string "popup.py babel done"))'
> to your `org-babel-after-execute-hook'.
>> I get the popup immediately and the results after 10 seconds.  The
>> org-babel-after-execute-hook method worked fine.

Yes, as I said, the hook worked fine :-), although the function would
have to be munged so that the notification doesn't pop up
indiscriminately after every evaluation.

> That is probably because the elisp form in the :post value is executed
> at header-argument parse time before the code block is executed.  If
> instead your use a code block name as your post header argument it will
> only be evaluated after the code block finishes.

Thanks - that's good to know: the fact that it can be applied
selectively to certain code blocks does make it a much better solution
than the hook.

However, there is a problem:

--8<---------------cut here---------------start------------->8---
#+name: notify
#+BEGIN_SRC emacs-lisp :results none
(shell-command "popup.py DONE")

#+name: long-running
#+BEGIN_SRC shell :results output :post notify
sleep 5
echo DONE

#+RESULTS: long-running
: nil
--8<---------------cut here---------------end--------------->8---

The result seems to be the result of the notify block, not the
long-running one.


reply via email to

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