emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Eric S Fraga <ucecesf@ucl.ac.uk>
Cc: emacs-orgmode@gnu.org, Matthew Oesting <oestingm@me.com>
Subject: Re: Possible Calc support for Org-Babel?
Date: Fri, 29 Oct 2010 14:26:44 -0600	[thread overview]
Message-ID: <87k4l07njv.fsf@gmail.com> (raw)
In-Reply-To: <87tyk4epxl.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Fri, 29 Oct 2010 20:53:26 +0100")

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> "Eric Schulte" <schulte.eric@gmail.com> writes:
>
>> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
>>
>>> Eric,
>>>
>>> This is really nice!
>>>
>>> I had a problem initially in that calc-push-list was undefined.  I had
>>> to initiate calc first so maybe a
>>>
>>> : (require 'calc)
>>>
>>
>> Ah yes, that is in the ob-calc.el file, but not in the code snippet I
>> shared.  I'll commit this entire file to the repository.
>
> Ah, so should I use the code snippet you sent or should I be requiring
> 'ob-calc?  In either case, I still have problems (see below).
>

Require ob-calc, please don't use the snippet below.

>
>>> is required to ensure the functions you use are available?
>>>
>>> Then, out of the three examples you give, only one (3^3) worked.  The
>>> others give me:
>>>
>>
>> I just made a change which should fix this issue.
>
> Very strange.  I'm still seeing the same problems, both with
> calc-push-list not known (having to manually require 'calc) and then
> errors evaluating the 1+2 block:
>

judging from the error below, it looks as though you are still using the
old code (or the snippet below).  Please ensure you're on the latest and
give it another go.

>
> Debugger entered--Lisp error: (wrong-type-argument stringp (2
>"Expected a number"))
>   string-match("\\` *\\([0-9]+\\) *\\'" (2 "Expected a number"))
>   math-read-number((2 "Expected a number"))
>   (list (math-read-number (calc-eval line)))

in the latest code the line

  (list (math-read-number (calc-eval line)))

has been replaced by

  (list ((lambda (res)
    (if (numberp res) res (math-read-number res)))
   (calc-eval line)))

Best -- Eric

  reply	other threads:[~2010-10-29 20:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 17:17 Possible Calc support for Org-Babel? Matthew Oesting
2010-10-26 18:37 ` Eric Schulte
2010-10-29  6:42   ` Eric Schulte
2010-10-29  7:13     ` Carsten Dominik
2010-10-29 11:14     ` Eric S Fraga
2010-10-29 14:43       ` Eric Schulte
2010-10-29 16:22         ` Eric Schulte
2010-10-29 19:53         ` Eric S Fraga
2010-10-29 20:26           ` Eric Schulte [this message]
     [not found]             ` <87hbg4pooh.fsf@ucl.ac.uk>
     [not found]               ` <871v7879x5.fsf@gmail.com>
2010-10-30 20:54                 ` Eric S Fraga
2010-11-03 20:10                   ` Eric Schulte
2010-10-29 11:27     ` Sébastien Vauban
2010-10-29 14:46       ` Eric Schulte
  -- strict thread matches above, loose matches on Subject: below --
2010-11-03 22:42 Eric S Fraga
2010-11-04 13:24 ` Eric Schulte
2010-11-04 14:13   ` Eric S Fraga
2010-11-04 14:42   ` Sébastien Vauban
2010-11-04 15:33     ` Eric Schulte
2010-11-04 16:02       ` Sébastien Vauban
2011-01-27  0:39   ` Christopher Allan Webber
2011-02-23  4:35     ` Eric Schulte
2011-02-24 10:13       ` Eric S Fraga
2011-02-27 21:32         ` Eric Schulte
2011-02-28 18:16           ` Eric S Fraga
2011-03-01 17:34             ` Eric Schulte
2011-03-01 20:10               ` Eric S Fraga
2011-03-07  9:16               ` Eric S Fraga
2011-03-01 20:48 orgmode

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=87k4l07njv.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=oestingm@me.com \
    --cc=ucecesf@ucl.ac.uk \
    /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).