From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: using variables in org text Date: Sat, 18 Feb 2012 11:52:39 +0100 Message-ID: References: <4F3D1446.50508@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyhuE-0004n8-9C for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 05:52:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyhuC-00021R-Vr for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 05:52:42 -0500 Received: from mail-vx0-f169.google.com ([209.85.220.169]:46068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyhuC-00021J-TS for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 05:52:40 -0500 Received: by vcbf13 with SMTP id f13so3525357vcb.0 for ; Sat, 18 Feb 2012 02:52:39 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: emacs-orgmode On 16 February 2012 17:05, Thomas S. Dye wrote: > Rainer M Krug writes: > >> Hi >> >> I have defined a variable as follow >> >> #+property: var =A0DC=3D"/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$ >> =A0 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. Great idea - I will try it as soon as I am back at work. Cheers, Rainer > > hth, > Tom > > -- > Thomas S. Dye > http://www.tsdye.com --=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : =A0 =A0 =A0 +33 - (0)9 53 10 27 44 Cell: =A0 =A0 =A0 +33 - (0)6 85 62 59 98 Fax (F): =A0 =A0 =A0 +33 - (0)9 58 10 27 44 Fax (D): =A0 =A0+49 - (0)3 21 21 25 22 44 email: =A0 =A0 =A0Rainer@krugs.de Skype: =A0 =A0 =A0RMkrug