> I do not see an easy way to do what you want only with tangle.
>
> There are hooks you can define that might enable you to set things up.
> Maybe you can use `org-babel-pre-tangle-hook' to collect the property
> values and put them somewhere that `org-babel-post-tangle-hook' can get at
> them
On Fri, 15 Jul 2016, Joon Ro wrote:
Example:
--8<---cut here---start->8---
* Top Heading
#+NAME: get-property
#+BEGIN_SRC emacs-lisp :noweb yes :var prop="prop" :var pom=0
(car (org-entry-get-multivalued-property pom prop))
#+END_SRC
** Subheading
:PRO
>
> Example:
>
> --8<---cut here---start->8---
>
> * Top Heading
>
> #+NAME: get-property
> #+BEGIN_SRC emacs-lisp :noweb yes :var prop="prop" :var pom=0
> (car (org-entry-get-multivalued-property pom prop))
> #+END_SRC
>
> ** Subheading
> :PROPERTIES:
> :
On Fri, 15 Jul 2016, Joon Ro wrote:
I spoke too early - with (org-entry-get nil prop) I have to put the code
block under the subtree I want to extract the property value from. Would
it be possible to get the property value of the current subtree?
Give org-entry-get a suitable value for `pom
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 pr
> --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 <>
>
> #+END_SRC
> Date: Thu, 7 Jul 2016 08:48:03 -0700
> From: ccbe...@ucsd.edu
> To: joon...@outlook.com
> Subject: Re: [O] Using property values in source code blocks
> CC: emacs-orgmode@gnu.org
>
> On Wed, 6 Jul 2016, Joon Ro wrote:
>
> >
> >
> >
> >>
On Wed, 6 Jul 2016, Joon Ro wrote:
I have no idea what you are asking.
[snip]
I'm sorry if my explanation was not clear, but the original example I
provided shows exactly what I wanted to do:
And my response showed how to do it: you construct a src block with a
noweb reference that p
> I have no idea what you are asking.
>
> > The reason is I have to put those values inside a comment,
> > so I cannot pass them as variables.
>
> So your original query about accessing property values from src blocks was
> not what you wanted?
>
> Examples of what one is trying to do - eve
On Wed, 6 Jul 2016, Joon Ro wrote:
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
[deleted]
Thank you so much for the reply - this would be very useful. Would
> 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"
> (or
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,
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,
* Subtree:PROPERTIES::DUMMY: Value:END:
13 matches
Mail list logo