emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Using property values in source code blocks


From: Joon Ro
Subject: Re: [O] Using property values in source code blocks
Date: Wed, 6 Jul 2016 15:03:34 -0500


> 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
>

Thank you so much for the reply - this would be very useful. Would there be, however, a way to directly replace some place holder inside a source code block? The reason is I have to put those values inside a comment, so I cannot pass them as variables.

Best,
Joon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]