On Tue, 5 Jul 2016, Joon Ro wrote:

Hi,

I'm aware of passing variables through header arguments, and also inserting another source code block using the noweb syntax.

I was wondering, however, would it be possible to directly input values of properties inside source code blocks? For example,

Yes. `org-property-values' does the trick


* Subtree
:PROPERTIES:
:DUMMY: Value
:END:

#+BEGIN_SRC shell :var dumdum=(car (org-property-values "DUMMY"))
echo $dumdum
#+END_SRC

#+RESULTS:
: Value

#+NAME: get-property
#+BEGIN_SRC emacs-lisp :var prop="prop"
(org-property-values prop)
#+END_SRC

#+BEGIN_SRC emacs-lisp :noweb yes
(quote
<<get-property(prop="DUMMY")>>
)
#+END_SRC

#+RESULTS:
| Value |

HTH,

Chuck

Reply via email to