From: tsd@tsdye.com (Thomas S. Dye)
To: Yotam Avital <yotama9@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Passing variables between code blocks
Date: Thu, 24 Jan 2013 03:38:10 -1000 [thread overview]
Message-ID: <m1sj5q3dml.fsf@tsdye.com> (raw)
In-Reply-To: <CAAShNtsxJ3J1XQkTKBDUVDcA=Me8RuwZFJMct-yPX8uveQVJKw@mail.gmail.com> (Yotam Avital's message of "Thu, 24 Jan 2013 12:01:51 +0200")
Hi Yatam Avital,
Yotam Avital <yotama9@gmail.com> 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
prev parent reply other threads:[~2013-01-24 13:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 10:01 Passing variables between code blocks Yotam Avital
2013-01-24 13:38 ` Thomas S. Dye [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1sj5q3dml.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
--cc=yotama9@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.