From: Nick Dokos <nicholas.dokos@hp.com>
To: Neuwirth Erich <erich.neuwirth@univie.ac.at>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: Assigning results to variables
Date: Sat, 24 Mar 2012 22:09:26 -0400 [thread overview]
Message-ID: <4194.1332641366@alphaville> (raw)
In-Reply-To: Message from Neuwirth Erich <erich.neuwirth@univie.ac.at> of "Sun, 25 Mar 2012 03:39:20 +0200." <B49B6361-A86A-491B-B3B7-4B5130F07DBC@univie.ac.at>
Neuwirth Erich <erich.neuwirth@univie.ac.at> wrote:
> Is it possible to assign the results of a babel code block to a
> variable? Then the results produce by one language could be
> transferred as input to a code block in another language. I studied
> the documentation and could not find any hint about this.
>
Here's a very simple example:
--8<---------------cut here---------------start------------->8---
* chaining calculations
#+name: foo
#+BEGIN_SRC elisp
(+ 3 4)
#+END_SRC
#+RESULTS: foo
: 7
#+BEGIN_SRC elisp :var x=foo
(* x x)
#+END_SRC
#+RESULTS:
: 49
--8<---------------cut here---------------end--------------->8---
Nick
next prev parent reply other threads:[~2012-03-25 2:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-25 1:39 Assigning results to variables Neuwirth Erich
2012-03-25 2:09 ` Nick Dokos [this message]
2012-03-25 8:22 ` Erich Neuwirth
2012-03-26 11:42 ` Eric Schulte
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4194.1332641366@alphaville \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=erich.neuwirth@univie.ac.at \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).