Re: [O] Modify a variable before it is passed to babel (or exported)?

2019-09-16 Thread Ken Mankoff
Hello, I solved this with (org-sbe). For example, using "add-one" and "table" from the original email #+Name: test-add-one #+BEGIN_SRC python :results output values :var data=(org-sbe add-one (data table)) print(data) #+END_SRC #+RESULTS: test-add-one : 43 Or src_elisp{(org-sbe add-one

[O] Modify a variable before it is passed to babel (or exported)?

2019-09-16 Thread Ken Mankoff
I'd like to modify a variable with a babel block before another block sees the variable. For example, I always want to add one to a variable: #+NAME: add-one #+BEGIN_SRC bash :results verbatim :var data=0 data=$(( data + 1 )) echo $data #+END_SRC #+RESULTS: add_one : 1 Test it: #+CALL: