emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] using variables in org text


From: Thomas S. Dye
Subject: Re: [O] using variables in org text
Date: Thu, 16 Feb 2012 06:05:31 -1000

Rainer M Krug <address@hidden> writes:

> Hi
>
> I have defined a variable as follow
>
> #+property: var  DC="/home/rkrug/tmp/CLUSTER"
>
> and I am using this path quite often in source blocks (works nicely as
> expected) but also in org directly, e.g.
>
> * DC path is $DC$
>   The DC path $DC$ is pointing to a directory.
>
> Is it possible to use the variable DC in the text as well, so that
> $DC$ is replaced with the value of the variable DC as defined above?
> In other words: how can I tell org that on export, $DC$ stands for the
> value of the variable DC?
>
> Cheers,
>
> Rainer
>
> PS: I know that $...$ is for LaTeX math mode
Aloha Rainer,

Here is a way that works for me.

* Krug

How to have a variable show up in text.

#+name: printDC
#+BEGIN_SRC emacs-lisp :results silent raw :exports none
(print DC)
#+END_SRC

In the text call_printDC() is shown.

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



reply via email to

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