From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joon Ro Subject: Re: Using property values in source code blocks Date: Thu, 7 Jul 2016 10:53:22 -0500 Message-ID: References: , , , , , , , , , Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_875ada4c-36ca-464c-a0ac-abf5898bfe06_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBcG-0005aZ-Nl for emacs-orgmode@gnu.org; Thu, 07 Jul 2016 11:53:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLBcC-00060t-Ix for emacs-orgmode@gnu.org; Thu, 07 Jul 2016 11:53:27 -0400 Received: from col004-omc3s7.hotmail.com ([65.55.34.145]:59540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLBcC-00060e-9o for emacs-orgmode@gnu.org; Thu, 07 Jul 2016 11:53:24 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Charles C. Berry" Cc: "emacs-orgmode@gnu.org" --_875ada4c-36ca-464c-a0ac-abf5898bfe06_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > Date: Thu=2C 7 Jul 2016 08:48:03 -0700 > From: ccberry@ucsd.edu > To: joon.ro@outlook.com > Subject: Re: [O] Using property values in source code blocks > CC: emacs-orgmode@gnu.org >=20 > On Wed=2C 6 Jul 2016=2C Joon Ro wrote: >=20 > > > > > > > >> I have no idea what you are asking. > >> >=20 > [snip] >=20 > > I'm sorry if my explanation was not clear=2C but the original example I= =20 > > provided shows exactly what I wanted to do: >=20 > And my response showed how to do it: you construct a src block with a=20 > noweb reference that places the *results* of evaluating another src block= =20 > in the code (or comment). The src block in the named in the noweb=20 > reference handles retrieving the property value=2C viz. >=20 > --8<---------------cut here---------------end--------------->8--- >=20 > * Subtree > :PROPERTIES: > :DUMMY: Value > :END: >=20 > #+NAME: get-property > #+BEGIN_SRC emacs-lisp :var prop=3D"prop" > (car (org-property-values prop)) > #+END_SRC >=20 > #+BEGIN_SRC shell :noweb yes >=20 > echo <> >=20 > #+END_SRC >=20 > #+RESULTS: > : Value >=20 > --8<---------------cut here---------------end--------------->8--- >=20 >=20 > See >=20 > (info "(org) Noweb reference syntax") >=20 >=20 > Chuck >=20 I see. I must have misunderstood that example. I will try that - thank you = so much! = --_875ada4c-36ca-464c-a0ac-abf5898bfe06_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


>=3B Date: Thu=2C= 7 Jul 2016 08:48:03 -0700
>=3B From: ccberry@ucsd.edu
>=3B To: j= oon.ro@outlook.com
>=3B Subject: Re: [O] Using property values in sour= ce code blocks
>=3B CC: emacs-orgmode@gnu.org
>=3B
>=3B On = Wed=2C 6 Jul 2016=2C Joon Ro wrote:
>=3B
>=3B >=3B
>=3B &= gt=3B
>=3B >=3B
>=3B >=3B>=3B I have no idea what you are a= sking.
>=3B >=3B>=3B
>=3B
>=3B [snip]
>=3B
>= =3B >=3B I'm sorry if my explanation was not clear=2C but the original ex= ample I
>=3B >=3B provided shows exactly what I wanted to do:
&g= t=3B
>=3B And my response showed how to do it: you construct a src bl= ock with a
>=3B noweb reference that places the *results* of evaluati= ng another src block
>=3B in the code (or comment). The src block in = the named in the noweb
>=3B reference handles retrieving the property= value=2C viz.
>=3B
>=3B --8<=3B---------------cut here-------= --------end--------------->=3B8---
>=3B
>=3B * Subtree
>= =3B :PROPERTIES:
>=3B :DUMMY: Value
>=3B :END:
>=3B
>= =3B #+NAME: get-property
>=3B #+BEGIN_SRC emacs-lisp :var prop=3D"prop= "
>=3B (car (org-property-values prop))
>=3B #+END_SRC
>=3B =
>=3B #+BEGIN_SRC shell :noweb yes
>=3B
>=3B echo <=3B<= =3Bget-property(prop=3D"DUMMY")>=3B>=3B
>=3B
>=3B #+END_SRC<= br>>=3B
>=3B #+RESULTS:
>=3B : Value
>=3B
>=3B --8&= lt=3B---------------cut here---------------end--------------->=3B8---
= >=3B
>=3B
>=3B See
>=3B
>=3B (info "(org) Noweb= reference syntax")
>=3B
>=3B
>=3B Chuck
>=3B

I see. I must have misunderstood that example. I wil= l try that - thank you so much!


=
= --_875ada4c-36ca-464c-a0ac-abf5898bfe06_--