[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Passing variables between code blocks
From: |
Thomas S. Dye |
Subject: |
Re: [O] Passing variables between code blocks |
Date: |
Thu, 24 Jan 2013 03:38:10 -1000 |
Hi Yatam Avital,
Yotam Avital <address@hidden> 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