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: Eric Schulte
Subject: Re: [O] [ob-calc] bug when given table data as a variable
Date: Thu, 06 Mar 2014 15:10:42 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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.

Best,

Daniel Hackney <address@hidden> writes:

> 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
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



reply via email to

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