From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Passing variables between code blocks Date: Thu, 24 Jan 2013 03:38:10 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyN0w-0005na-Ht for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 08:38:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyN0p-0001HG-G1 for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 08:38:46 -0500 Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:36214) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TyN0p-0001Gd-6E for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 08:38:39 -0500 In-Reply-To: (Yotam Avital's message of "Thu, 24 Jan 2013 12:01:51 +0200") 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: Yotam Avital Cc: emacs-orgmode@gnu.org Hi Yatam Avital, Yotam Avital writes: > I want to use org-mode for data analysis for my results. I also want to do > this using small chunks of code blocks for various task. To achieve that. I > need to pass dictionaries (20 entries of lists, each of several hundreds > variables, each is a list by itself). I wanted to do so by the #+CALL > option for example: > > > * test > #+NAME:test > #+BEGIN_SRC python > vars = dict() > vars[1] = 1 > vars[2] = 2 > return vars > > #+END_SRC > > * caller > #+NAME: caller > #+HEADER: :var ins=#+CALL: test() > #+BEGIN_SRC python :results output > print files > > #+END_SRC You have the wrong syntax. There is no need for #+CALL: in this situation. See section 14.8.2.1 of the manual: code block without arguments a code block name (from the example above), as assigned by #+NAME:, optionally followed by parentheses #+BEGIN_SRC emacs-lisp :var length=table-length() (* 2 length) #+END_SRC hth, Tom -- Thomas S. Dye http://www.tsdye.com