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: Wed, 03 Nov 2010 14:10:42 -0600	[thread overview]
Message-ID: <87sjzigocd.fsf@gmail.com> (raw)
In-Reply-To: <87zktv7659.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Sat, 30 Oct 2010 21:54:58 +0100")

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

> "Eric Schulte" <schulte.eric@gmail.com> writes:
>> alright, thanks for sticking with this.  You are definitely now using
>> the latest code.  I believe the newest version of the ob-calc-eval
>> function should work -- at the very least it should give a nicer error
>> message.  Could you please require update again and let me know how it
>> goes?
>
> (for the list's benefit: Eric and I have had a few out-of-the-list
> exchanges but as everything now seems to be working fine, I thought I'd
> reconnect the thread to the list...)
>
> Eric, 
>
> just to confirm that it all seems to work just fine from a cold boot of
> emacs without any extra (require 'ob-eval).  My babel configuration has
> the following:
>
> #+begin_src emacs_lisp
> (org-babel-do-load-languages
>  'org-babel-load-languages
>  '((R . t)
>    (calc . t)
>    (ditaa . t)
>    ...
> #+end_src
>
> and that's about it really.  Evaluating the calc examples you sent
> initially all work perfectly.
>

Fantastic.

>
> Using src_calc{5-2}, for instance, also works just fine for export.
>
> I now wonder if it would be worthwhile discussing the choices you have
> made regarding stack versus algebraic evaluation.  I would rather have
> the quote mean an algebraic expression, just from the simple reason that
> these will be longer than stack operations and so the overhead of a
> quote is smaller as a percentage of keystrokes...
>

Hmm, one point against prefixing the algebraic expressions is that they
would be more likely to be used by themselves in an inline code block.
Maybe there is a better way to recognize when a line is a stack vs. an
algebraic expression.  For example if the line is resolvable to a stack
operation (i.e. an element of '(+ - ...)) then treat it as such,
otherwise just treat it as an algebraic expression.

>
> Anyway, thanks for this.  I think this is going to be quite useful but
> it does mean really getting down and learning emacs calc...

Yes, I need to learn calc as well.

  reply	other threads:[~2010-11-03 20:10 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
     [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 [this message]
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=87sjzigocd.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).