On 2014-04-17 12:24, Thorsten Jolitz <[email protected]> writes:
> Alan Schmitt <[email protected]> writes:
>
>>> #+name:test2
>>> #+begin_src emacs-lisp :var z="bar"
>>> (let ((y (org-sbe test1 (x (intern z)))))
>>> y)
>>> #+end_src
>>
>> Thank you for the suggestion, but it returns a symbol and not the
>> string. In the more complex setting I'm playing with I need a string
>> there.
>
> w/o knowing what this thread is about (since I did not follow it) I
> would say that all you need is
>
> ,----------------
> | (symbol-name y)
> `----------------
>
> as last expression.
Thanks, this helped me much!
So the solution is to use "eval", which seems to be interpreted by
org-sbe:
--8<---------------cut here---------------start------------->8---
#+name: test1
#+begin_src emacs-lisp :var x="foo"
x
#+end_src
#+name: test2
#+begin_src emacs-lisp :var z="bar"
(let ((y (org-sbe test1 (x (eval z)))))
y)
#+end_src
#+results: test2
: bar
#+call: test2(z="baz")
#+results:
: baz
--8<---------------cut here---------------end--------------->8---
I still would really like what can (and cannot) be done with sbe, but
this should be enough to let me make progress.
Thanks again,
Alan