Eric Schulte <schulte.e...@gmail.com> writes: > Nick Dokos <ndo...@gmail.com> 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") #+END_SRC #+name: long-running #+BEGIN_SRC shell :results output :post notify sleep 5 echo DONE #+END_SRC #+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. -- Nick