I'm using emacs org mode for reproducible research. I'm having trouble chaining the results of calls to code blocks. As a minimal example of what I'm trying to do:
* Functions
#+name: f1
#+begin_src elisp :var x=7
(+ x x)
#+end_src
#+name: f2
#+begin_src elisp :var x=7
(+ x 2)
#+end_src
* Data
#+name: intermediate
#+call: f1(x=5)
#+RESULTS: intermediate
: 10
#+call: f2(x=intermediate)
When I call f2
, it fails because x
is nil
. If I remove the name from the call on f1
, then f2 works, but the results don't stay in sync if I change the parameters for f1
.
How do I tell org mode that I want to see the results of the function call without needing to manually rename the results every time they are calculated?