From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Hackney Subject: [ob-calc] bug when given table data as a variable Date: Tue, 4 Mar 2014 22:34:42 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL2bs-0002rW-Uj for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 22:35:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WL2bp-0005n6-8t for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 22:35:08 -0500 Received: from mail-ig0-x22f.google.com ([2607:f8b0:4001:c05::22f]:56855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL2bp-0005lN-29 for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 22:35:05 -0500 Received: by mail-ig0-f175.google.com with SMTP id ur14so7006879igb.2 for ; Tue, 04 Mar 2014 19:35:04 -0800 (PST) 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: emacs-orgmode@gnu.org I am trying to use data from a table in a calc source block, but I get the following error when trying to eval the block: #+BEGIN_EXAMPLE math-format-stack-value: Wrong type argument: symbolp, 10 #+END_EXAMPLE Here is an example file which demonstrates the problem: #+BEGIN_EXAMPLE Org version: 8.2.5h (org-20140224 from package) Emacs version: 24.3.1 Run after starting Emacs with =emacs -Q= #+BEGIN_SRC elisp (add-to-list 'org-babel-load-languages '(calc . t)) (require 'ob-calc) #+END_SRC #+NAME: the-table | a | b | c | |---+----+-----| | 1 | 10 | 100 | | 2 | 20 | 200 | | 3 | 30 | 300 | | 4 | 40 | 400 | #+BEGIN_SRC calc :var data=the-table[,1] 1 #+END_SRC #+BEGIN_SRC elisp :var data=the-table[,1] (format "%s" data) #+END_SRC #+END_EXAMPLE I'm not familiar with the workings of calc, but is there a workaround? P.S. Please CC me in replies since I'm not subscribed to the list. -- Daniel Hackney