From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Oberbrunner Subject: Macros or properties in source blocks Date: Tue, 11 Aug 2015 12:34:31 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3a36c3930fe051d0bade7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPCVa-0005DV-MR for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 12:34:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPCVV-0007Ra-GP for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 12:34:38 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:34907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPCVV-0007RW-9g for emacs-orgmode@gnu.org; Tue, 11 Aug 2015 12:34:33 -0400 Received: by lahi9 with SMTP id i9so43757821lah.2 for ; Tue, 11 Aug 2015 09:34:31 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Orgmode Mailing List --001a11c3a36c3930fe051d0bade7 Content-Type: text/plain; charset=UTF-8 I'd like to have either a macro or a property that controls some behavior of an org-mode babel file: #+PROPERTY: report_type All and use that property inline: {{{property(report_type)}}} and in a source block: #+NAME: rtype #+BEGIN_SRC emacs-lisp :results value {{{property(report_type)}}} #+END_SRC And use that source block: The report type is call_rtype()[:results raw] But this doesn't work, I get "Symbol's value as variable is void: {{{property Is there any way to interpolate macros or properties into a source block like this? Or is there a better way for me to set org-mode "global variables" at the top of my file? -- Gary --001a11c3a36c3930fe051d0bade7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'd like to have either a macro or a property that con= trols some behavior of an org-mode babel file:

#+PROPERT= Y: report_type All

and use that property inline: {= {{property(report_type)}}} and in a source block:

= #+NAME: rtype
#+BEGIN_SRC emacs-lisp :results value
{{{= property(report_type)}}}
#+END_SRC

And use that source block:

The report type = is call_rtype()[:results raw]

But this doesn't= work, I get "Symbol's value as variable is void: {{{property

Is there any way to interpolate macros or properties i= nto a source block like this? Or is there a better way for me to set org-mo= de "global variables" at the top of my file?

= --
Gary
--001a11c3a36c3930fe051d0bade7--