Hi all, how do I go about to tangle a subtree full of call lines into a specific file? Of course, tangling is not execution and call lines are meant for execution, but in a scripting language (this is all about R code) the two are not too different.
Basically, I would love to see the code, that gets executed by 'org-babel-execute-subtree' to be saved to a given file. Simply setting an tangle-file for the subtree does not work [fn:1]. (Which is not surprising...) But I guess I could use some pre-exec-hook together with some fine lisp code to append the expanded call line code to a given file could do the trick. I'd be grateful for any help here. Regards, Andreas Footnotes: [fn:1] A simple example: --8<---------------cut here---------------start------------->8--- #+PROPERTY: tangle test.R I'd like to 'tangle' the 'Do all' subtree calls. * Do all :PROPERTIES: :tangle: do_all.R :END: #+call: src_b() #+call: src_a() #+call: src_c() * Source #+name: src_a #+begin_src R a <- 10 #+end_src #+name: src_b #+begin_src R b <- 100 #+end_src #+name: scr_c #+begin_src R plot(a, b) #+end_src --8<---------------cut here---------------end--------------->8---