From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Using property values in source code blocks Date: Wed, 6 Jul 2016 10:36:55 -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]:48113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKqky-0005Zu-8y for emacs-orgmode@gnu.org; Wed, 06 Jul 2016 13:37:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKqku-0001sR-07 for emacs-orgmode@gnu.org; Wed, 06 Jul 2016 13:37:03 -0400 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:1523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKqkt-0001sA-NE for emacs-orgmode@gnu.org; Wed, 06 Jul 2016 13:36:59 -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 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, 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" (org-property-values prop) #+END_SRC #+BEGIN_SRC emacs-lisp :noweb yes (quote <> ) #+END_SRC #+RESULTS: | Value | HTH, Chuck