From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Possible Calc support for Org-Babel? Date: Sun, 27 Feb 2011 14:32:29 -0700 Message-ID: <87lj1188pe.fsf@gmail.com> References: <878w1ani4w.fsf@ucl.ac.uk> <87eib1dxll.fsf@gmail.com> <87hbcvnpr4.fsf@dustycloud.org> <87zkpn8j10.fsf@gmail.com> <87fwrdoi43.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=54219 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtoEO-0008Mr-L2 for emacs-orgmode@gnu.org; Sun, 27 Feb 2011 16:32:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtoEJ-0001Fl-4j for emacs-orgmode@gnu.org; Sun, 27 Feb 2011 16:32:44 -0500 Received: from mail-iw0-f169.google.com ([209.85.214.169]:54817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtoEI-0001FZ-Ra for emacs-orgmode@gnu.org; Sun, 27 Feb 2011 16:32:39 -0500 Received: by iwl42 with SMTP id 42so3419496iwl.0 for ; Sun, 27 Feb 2011 13:32:37 -0800 (PST) In-Reply-To: <87fwrdoi43.fsf@pinto.chemeng.ucl.ac.uk> (Eric S. Fraga's message of "Thu, 24 Feb 2011 10:13:32 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: emacs-orgmode@gnu.org, Matthew Oesting Eric S Fraga writes: > "Eric Schulte" writes: > >> Christopher Allan Webber writes: >> >>> (failed to wide-reply initially) >>> >>> I just had use for this for some quick calculations I wanted to add to >>> one of my files, but... >>> >>> Any idea why variables inside of parentheses don't work, but variables >>> outside of them do? >>> >>> #+BEGIN_SRC calc :var testvar=9000 >>> testvar - 200 >>> #+END_SRC >>> >>> #+results: >>> : 8800 >>> >>> >>> #+BEGIN_SRC calc :var testvar=9000 >>> (testvar - 200) 800 >>> #+END_SRC >>> >>> #+results: >>> : 800 testvar - 160000 >>> >> >> Hi Christopher, >> >> Sorry about the LONG delay in replying to this email. I've just pushed >> up a fix for this problem. Thanks for reporting. >> >> Best -- Eric > > Further on this, any suggestions on how to pass a vector variable to > calc using babel? I tried > > #+begin-src org > #+begin_src calc :var y=[1 2 3] > 3 y > #+end_src > #+end_src > > but get an error that says > > : Bad format in variable contents: Expected a number > > I've tried putting the vector in quotes but that doesn't help either. > Is this maybe not possible? > With the newest version of Org-mode, I'm now getting the following output. #+begin_src calc :var y=[1 2 3] 3 y #+end_src #+results: : (3, 6) Does this look correct? Best -- Eric > > Thanks, > eric