emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] babel completion notification


From: Grant Rettke
Subject: Re: [O] babel completion notification
Date: Tue, 18 Mar 2014 21:00:47 -0500

The other options are prettier and the hook is more flexible; I had only cared about
tangling though so I set this:

(defadvice org-babel-tangle (before org-babel-tangle-before activate)
  (message (concat "org-babel-tangle BEFORE: <"
                   (format-time-string "%Y-%m-%dT%T%z")
                   ">")))

(defadvice org-babel-tangle (after org-babel-tangle-after activate)
  (message (concat "org-babel-tangle AFTER: <"
                   (format-time-string "%Y-%m-%dT%T%z")
                   ">")))

For some reason couldn't get around advice working here, it was just never run.


On Tue, Mar 18, 2014 at 9:32 AM, Eric Schulte <address@hidden> wrote:
> 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.

Yes, that's how post blocks are supposed to work, they're normally used
to post-process results.  You should add a variable to the post block
and have it return that variable, e.g.,

#+name: notify
#+begin_src emacs-lisp :var data=""> (shell-command "popup.py DONE")
data
#+end_src

--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D




--
Grant Rettke | ACM, AMA, COG, IEEE
address@hidden | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson

reply via email to

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