My 1st question on Stack (>﹏<)!
When I write my homework in org-mode, I want to use the literate programming with org-babel.
So I use python as the major language to calculate the results I need in the org file. I use inline call(#+call:
or call_<function-name>
) with different arguments to realize different functions.
However, I find that #+call:
adds an extra newline between in the results block. To avoid that , I use call_<function-name>
as an inline call.
But my functions take time to execute, so I want to cache the results of function calls to avoid delays. But with the call, call_<function-name>[:cache yes]
, the results are not cached.
The following is the original function:
#+NAME: Daoqiex00
#+begin_src python :var R0=10 N=19 :exports none :results value :cache yes
import numpy as np
return np.cosh(1/(N-1)*np.arccosh(R0))
#+end_src
And the inline call is:
We will find \(x_{0}=\) call_Daoqiex00(R0=10,N=19)[:results value raw :cache yes].
How can I make this inline call cache the results?
(This has been tested on emacs 24.5, using org 8.2.10)