[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Using property values in source code blocks
From: |
Charles C. Berry |
Subject: |
Re: [O] Using property values in source code blocks |
Date: |
Thu, 7 Jul 2016 08:48:03 -0700 |
User-agent: |
Alpine 2.20 (OSX 67 2015-01-07) |
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 places the *results* of evaluating another src block
in the code (or comment). The src block in the named in the noweb
reference handles retrieving the property value, viz.
--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---
See
(info "(org) Noweb reference syntax")
Chuck
- [O] Using property values in source code blocks, Joon Ro, 2016/07/06
- Re: [O] Using property values in source code blocks, Charles C. Berry, 2016/07/06
- Re: [O] Using property values in source code blocks, Joon Ro, 2016/07/06
- Re: [O] Using property values in source code blocks, Charles C. Berry, 2016/07/06
- Re: [O] Using property values in source code blocks, Joon Ro, 2016/07/06
- Re: [O] Using property values in source code blocks,
Charles C. Berry <=
- Re: [O] Using property values in source code blocks, Joon Ro, 2016/07/07
- Re: [O] Using property values in source code blocks, Joon Ro, 2016/07/15
- Re: [O] Using property values in source code blocks, Joon Ro, 2016/07/15
- Re: [O] Using property values in source code blocks, Charles C. Berry, 2016/07/15
- Re: [O] Using property values in source code blocks, Joon Ro, 2016/07/15
- Re: [O] Using property values in source code blocks, Charles C. Berry, 2016/07/16
- Re: [O] Using property values in source code blocks, Joon Ro, 2016/07/16