From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Hackney Subject: Re: [ob-calc] bug when given table data as a variable Date: Thu, 6 Mar 2014 20:02:57 -0500 Message-ID: References: <87siqvt1jo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLjC4-0004iz-EA for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 20:03:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLjC3-0005xt-FS for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 20:03:20 -0500 Received: from mail-ie0-x236.google.com ([2607:f8b0:4001:c03::236]:47968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLjC3-0005xf-8U for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 20:03:19 -0500 Received: by mail-ie0-f182.google.com with SMTP id y20so3685351ier.41 for ; Thu, 06 Mar 2014 17:03:18 -0800 (PST) In-Reply-To: <87siqvt1jo.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode@gnu.org Eric Schulte 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