emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: dybbuk-qPb3x58jdZkAvxtiuMwx3w@public.gmane.org (Erik L. Arneson)
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: org-babel and OCaml - help?
Date: Fri, 16 Jul 2010 08:12:10 -0700	[thread overview]
Message-ID: <m2r5j38nqt.fsf@tyche.LNouv.com> (raw)

Hi everybody,

I have just started playing around with org-babel, and it's really
awesome!  I've had great luck with emacs-lisp source blocks, and when I
saw that OCaml source blocks were also supported, I started testing
those out.  Right away I ran into trouble, though.  Observe the example
below:

--8<---------------cut here---------------start------------->8---
#+tblname: example-table
| 1 | 2 |
| 2 | 3 |
| 3 | 5 |
| 4 | 6 |

#+source: ocaml-length
#+begin_src ocaml :var table=example-table
  List.length table
#+end_src

#+results: ocaml-length
: Characters 14-15:
:   let table = ((1 2) (2 3) (3 5) (4 6));
:                 ^
: Error: This expression is not a function; it cannot be applied

#+results: ocaml-length
--8<---------------cut here---------------end--------------->8---

It looks as though the 'table' variable is being passed as Lisp code
instead of OCaml.  Is there something that my setup is missing, or does
the OCaml code perhaps need more help?  Maybe I did something wrong?

(I'd love to work on fixing up the OCaml interface, if that's needed.)

-- 
Erik Arneson <dybbuk-qPb3x58jdZkAvxtiuMwx3w@public.gmane.org>
  GPG Key ID: 1024D/62DA1D25
  Office: +1.541.291.9776
  Skype: callto://pymander


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2010-07-16 15:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16 15:12 Erik L. Arneson [this message]
2010-07-16 19:59 ` [PATCH] Fix list assignments in ob-ocaml.el Erik L. Arneson
2010-07-16 20:59   ` Erik L. Arneson
2010-07-17 18:08     ` Eric Schulte
2010-07-17  0:41   ` Bernt Hansen
2010-07-16 22:30 ` org-babel and OCaml - help? Eric Schulte
2010-07-18 14:30   ` Erik L. Arneson
2010-07-18 17:07     ` Eric Schulte
2010-07-21 16:56       ` [babel] " Erik L. Arneson
2010-07-21 22:19         ` [babel] Re: org-babel and OCaml Eric Schulte

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=m2r5j38nqt.fsf@tyche.LNouv.com \
    --to=dybbuk-qpb3x58jdzkavxtiumwx3w@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).