From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Using property values in source code blocks Date: Fri, 15 Jul 2016 19:05:52 -0700 Message-ID: References: , , , , , , , , , , , , , , , , , , , Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOEzR-0000Wv-Ag for emacs-orgmode@gnu.org; Fri, 15 Jul 2016 22:06:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOEzL-00067a-98 for emacs-orgmode@gnu.org; Fri, 15 Jul 2016 22:06:00 -0400 Received: from iport-acv4-out.ucsd.edu ([132.239.0.7]:45185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOEzL-00067P-0D for emacs-orgmode@gnu.org; Fri, 15 Jul 2016 22:05:55 -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: Joon Ro Cc: "emacs-orgmode@gnu.org" 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'. See the docstring for org-entry-get. 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: :DUMMY: 100 :END: #+BEGIN_SRC shell :noweb yes echo <> #+END_SRC #+RESULTS: : 100 --8<---------------cut here---------------end--------------->8--- Chuck