emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [Announcement] Org-babel initial release
Date: Tue, 15 Sep 2009 19:26:24 +0200	[thread overview]
Message-ID: <87pr9sazlr.fsf@gmx.de> (raw)
In-Reply-To: <m2ab0xzllj.fsf@gmail.com> (Eric Schulte's message of "Mon, 14 Sep 2009 07:44:57 -0600")

"Eric Schulte" <schulte.eric@gmail.com> writes:
> Dan Davison and I (Eric Schulte) are happy to announce that Org-babel
> has now been released as a contributed package in Org-mode with
> corresponding documentation on worg [1].

What else should I say - THIS IS GREAT NEWS!!

I wonder how complicated it would be to add more languages. Especially
PHP, JavaScript (e.g. per rhino) and Perl.

Is there some documentation or advice on the net in that concern? I'd
like to add a language I understand besides Bash... :)

Hmmm - maybe `org-babel-sh.el' is a good starting point.

* Some thoughts

I actually wonder, if all those interpreted languages are different at
all. Why not add an generic call to interpreters. Executing Shell
scripts or Perl, Php, JavaScript... makes no big difference here. On
Linux at least, they all work with either shebang or called with OPTION

To execute a temporary file without shebang, all interpreters take a

rhino -f FILE  # -f is optional
php   -f FILE  # -f is optional
perl     FILE

Or execute code directly (which is useless for us, since we would need
to quote the code correctly...):

rhino -e  CODE...
perl  -e  CODE...
php   -r  CODE...

So how about:

  #+srcname: generic-circumference(a)
  #+begin_src javascript :interpreter rhino -f

  print ( "Write me to temp file and call `rhino -f TMPFILE'" )
  java.lang.System.out.println ( 2 * a * java.lang.Math.PI )


This way, a source block written on my Linux-System would execute on her
MAC and his Windows machine without change (provided the interpreter is
installed and in $PATH... `org-program-exists' ... to use interpreters
without having them in $PATH, a customizable map could be used).

BTW: I just discovered rhino - looks interesting, seems you can
(de-)serialize Java(Script) objects... and thus keep track of things
between sessions ;) start programs, call Java Methods...  See

Best wishes,


  parent reply	other threads:[~2009-09-15 17:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 13:44 [Announcement] Org-babel initial release Eric Schulte
2009-09-15  8:20 ` Carsten Dominik
2009-09-15 13:31 ` Miguel Fernando Cabrera
2009-09-15 14:49   ` Eric Schulte
2009-09-15 15:10     ` Eric Schulte
2009-09-15 17:26 ` Sebastian Rose [this message]
2009-09-15 17:54   ` Eric Schulte
2009-09-15 19:15     ` Sebastian Rose
2009-09-15 20:03       ` Eric Schulte
2009-09-15 20:53         ` Sebastian Rose
2009-09-15 17:56   ` Rick Moynihan
2009-09-15 20:07     ` Eric Schulte
2009-09-15 22:02     ` Eric Schulte
2009-10-09 16:38       ` Marcelo de Moraes Serpa
2009-10-09 12:54 ` Org-babel for jython? Eric S Fraga
2009-10-09 15:34   ` Dan Davison

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:

  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=87pr9sazlr.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \


* 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


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