emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Hackney <dan@haxney.org>
To: emacs-orgmode@gnu.org
Subject: [ob-calc] bug when given table data as a variable
Date: Tue, 4 Mar 2014 22:34:42 -0500	[thread overview]
Message-ID: <CAMqXDZvOaCHpsZn0xyZ-DbyOR4mYNMkEUfr+W7mqsRLp6xYe-w@mail.gmail.com> (raw)

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

             reply	other threads:[~2014-03-05  3:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  3:34 Daniel Hackney [this message]
2014-03-06 22:10 ` [ob-calc] bug when given table data as a variable Eric Schulte
2014-03-07  1:02   ` Daniel Hackney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMqXDZvOaCHpsZn0xyZ-DbyOR4mYNMkEUfr+W7mqsRLp6xYe-w@mail.gmail.com \
    --to=dan@haxney.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).