emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Macros or properties in source blocks


From: Charles C. Berry
Subject: Re: [O] Macros or properties in source blocks
Date: Tue, 11 Aug 2015 17:41:37 -0700
User-agent: Alpine 2.11 (OSX 23 2013-08-11)

On Tue, 11 Aug 2015, Gary Oberbrunner wrote:

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,

[snip]

BUT THIS DOES:

--8<---------------cut here---------------start------------->8---

#+NAME: rtype
#+header: :var prop=(org-entry-get (point) "report_type" t)
#+BEGIN_SRC emacs-lisp
prop
#+END_SRC

And use that source block:

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

--8<---------------cut here---------------end--------------->8---

HTH,

Chuck



reply via email to

[Prev in Thread] Current Thread [Next in Thread]