From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Assigning results to variables Date: Sat, 24 Mar 2012 22:09:26 -0400 Message-ID: <4194.1332641366@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBcti-0004Rz-OU for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 22:09:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBctg-0006nv-C1 for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 22:09:34 -0400 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:39715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBctg-0006nm-84 for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 22:09:32 -0400 In-Reply-To: Message from Neuwirth Erich of "Sun, 25 Mar 2012 03:39:20 +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: Neuwirth Erich Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Neuwirth Erich 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