Pass a string argument to a block of code from a table in org mode
I am trying to pass a string as a code block argument when using org-mode
and org-babel
. Specifically, I consider the following minimal example:
#+NAME: test
#+BEGIN_SRC python :var x="foobar"
return len(x)
#+END_SRC
| 6 | #ERROR |
#+TBLFM: @1$1='(org-sbe test)::@1$2='(org-sbe test (x ("fb")))
As you can see, the first cell is filled in correctly. However, I cannot get the second one to process correctly. I've tried various options; eg:
#+TBLFM: @1$1='(org-sbe test)::@1$2='(org-sbe test (x "fb"))
#+TBLFM: @1$1='(org-sbe test)::@1$2='(org-sbe test(x="fb"))
Any ideas?
BTW: #+CALL: test(x="fb")
Returns the expected result, i.e. 2
... It seems that the syntax for inline invocation or "table invocation" is different ... :(
+3
source to share