emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Possible Calc support for Org-Babel?


From: Eric Schulte
Subject: Re: [Orgmode] Possible Calc support for Org-Babel?
Date: Sun, 27 Feb 2011 14:32:29 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Eric S Fraga <address@hidden> writes:

> "Eric Schulte" <address@hidden> writes:
>
>> Christopher Allan Webber <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]