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: Fri, 15 Jul 2016 18:38:36 -0500

> --8<---------------cut here---------------end--------------->8---
>
> * Subtree
> :PROPERTIES:
> :DUMMY: Value
> :END:
>
> #+NAME: get-property
> #+BEGIN_SRC emacs-lisp :var prop="prop"
> (car (org-property-values prop))
> #+END_SRC
>
> #+BEGIN_SRC shell :noweb yes
>
> echo <<get-property(prop="DUMMY")>>
>
> #+END_SRC
>
> #+RESULTS:
> : Value
>
> --8<---------------cut here---------------end--------------->8---
>

It seems org-property-values gets the property value for the buffer - it ends up getting the property value from the last subtree in the buffer. I solved this by using either (org-entry-get nil prop) or (car (org-entry-get-multivalued-property nil prop)) instead of (car (org-property-values prop)). 

Thanks again!
-Joon


reply via email to

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