emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [ob-calc] bug when given table data as a variable


From: Daniel Hackney
Subject: Re: [O] [ob-calc] bug when given table data as a variable
Date: Thu, 6 Mar 2014 20:02:57 -0500

Eric Schulte <address@hidden> wrote:
> Org-mode's calc support is very limited. I think someone with a
> working knowledge of how calc uses vectors would need to add table
> support. Unfortunately calc experts seem to be few and far between.

Looking at the calc source code was not terribly helpful, since it is
barely documented. The info page can help somewhat, though.

Doing a little bit of digging, it looks like you can bind variables for
=calc-eval= like so:

#+BEGIN_SRC elisp
(let ((var-a "[1, 2, 3]"))
 (calc-eval "evalv(reduce(add, a))"))
#+END_SRC

#+RESULTS:
: 6

This pattern could be used for variable binding. It would mean wrapping
the code to be evaluated in =evalv=. If I get some time, I might
investigate writing a patch to do this.

--
Daniel Hackney



reply via email to

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