From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: using variables in org text Date: Thu, 16 Feb 2012 06:05:31 -1000 Message-ID: References: <4F3D1446.50508@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry3q7-0005nr-RP for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 11:05:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ry3q1-0001Dj-Gg for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 11:05:47 -0500 Received: from oproxy8-pub.bluehost.com ([69.89.22.20]:38124) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Ry3q0-0001DX-Vx for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 11:05:41 -0500 In-Reply-To: <4F3D1446.50508@gmail.com> (Rainer M. Krug's message of "Thu, 16 Feb 2012 15:35:50 +0100") 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: R.M.Krug@gmail.com Cc: emacs-orgmode Rainer M Krug 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