emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Moynihan <rick.moynihan@gmail.com>
To: Sebastian Rose <sebastian_rose@gmx.de>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [Announcement] Org-babel initial release
Date: Tue, 15 Sep 2009 18:56:30 +0100	[thread overview]
Message-ID: <e85471e30909151056j17be861r6a0990a8b0c889a1@mail.gmail.com> (raw)
In-Reply-To: <87pr9sazlr.fsf@gmx.de>

Reply below:

2009/9/15 Sebastian Rose <sebastian_rose@gmx.de>:
>
> * 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
> FILENAME.
>
> To execute a temporary file without shebang, all interpreters take a
> filename:
>
> 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 )
>
>  #+end_src
>
> 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).
>

Was having a similar idea, as I language I'd love to use with this is
my current fave clojure:

http://clojure.org/

It's a language based on the JVM and consequently being able to pass
in command line options to the interpreter is important...  I'd
imagine most of the time the source blocks within a single file would
share the vast majority of environment settings too (for example
setting the JVM's class path) so being able to specify these values to
pass to the interpreter, once at the top of the file would be really
nice.

R.

  parent reply	other threads:[~2009-09-15 17:57 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
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 [this message]
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:
  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=e85471e30909151056j17be861r6a0990a8b0c889a1@mail.gmail.com \
    --to=rick.moynihan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sebastian_rose@gmx.de \
    /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).