From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: [Announcement] Org-babel initial release Date: Tue, 15 Sep 2009 19:26:24 +0200 Message-ID: <87pr9sazlr.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mnbnc-00014C-5P for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 13:26:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnbnX-00010I-LI for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 13:26:39 -0400 Received: from [199.232.76.173] (port=52696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnbnX-00010B-J3 for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 13:26:35 -0400 Received: from mail.gmx.net ([213.165.64.20]:51432) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MnbnX-0007uV-0l for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 13:26:35 -0400 In-Reply-To: (Eric Schulte's message of "Mon, 14 Sep 2009 07:44:57 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Org Mode "Eric Schulte" 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 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). 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 https://developer.mozilla.org/en/Rhino_Shell Best wishes, Sebastian