From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas S. Dye Subject: Re: Local variables in an org file Date: Thu, 20 Aug 2015 16:52:13 -1000 Message-ID: References: <87fv3e4g63.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZScRV-0001sB-UO for emacs-orgmode@gnu.org; Thu, 20 Aug 2015 22:52:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZScRS-0003bj-PX for emacs-orgmode@gnu.org; Thu, 20 Aug 2015 22:52:33 -0400 Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:59885) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZScRS-0003ba-HO for emacs-orgmode@gnu.org; Thu, 20 Aug 2015 22:52:30 -0400 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: Grant Rettke Cc: Jarmo Hurri , "emacs-orgmode@gnu.org" Aloha all, Grant Rettke writes: > I've been thinking about this all week. Must be in the global memory space. > Grant Rettke Here is one way. * Define a local variable #+name: my-var #+header: :exports none #+begin_src R 768 #+end_src #+name: pass-my-var-to-code-block #+header: :var x=my-var #+header: :exports both #+begin_src emacs-lisp (+ x 1) #+end_src #+results: pass-my-var-to-code-block : 769 The variable is call_my-var(). When I export this to an ASCII buffer, I get: 1 Define a local variable ========================= ,---- | (+ x 1) `---- ,---- | 769 `---- The variable is `768'. All the best, Tom -- Thomas S. Dye http://www.tsdye.com