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 21:15:01 +0200 Message-ID: <87ab0waukq.fsf@gmx.de> References: <87pr9sazlr.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MndUc-0008Jk-1g for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 15:15:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MndUX-0008GJ-4W for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 15:15:09 -0400 Received: from [199.232.76.173] (port=37108 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MndUW-0008GG-W1 for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 15:15:05 -0400 Received: from mail.gmx.net ([213.165.64.20]:38915) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MndUW-0000iB-Fc for emacs-orgmode@gnu.org; Tue, 15 Sep 2009 15:15:04 -0400 In-Reply-To: (Eric Schulte's message of "Tue, 15 Sep 2009 11:54:36 -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: > Thanks, I hope fellow Orgers find it useful Sure they do! Make Emacs+Org-mode the `killer-application' :) >> I wonder how complicated it would be to add more languages. Especially >> PHP, JavaScript (e.g. per rhino) and Perl. ... >> Hmmm - maybe `org-babel-sh.el' is a good starting point. >> > > Yes, currently the best way to get a feel for how to add languages would > be to start with an existing language file (I'd suggest > org-babel-python.el or org-babel-ruby.el, or for simpler less > comprehensive language support look at org-babel-ditaa or > org-babel-haskell) and make changes from there. I agree that a brief > tutorial for adding language support would be helpful. A skeleton maybe? And just a few comments describing the I/O of the basic functions (and/or the global vars/containers that take the results). > Basically Org-babel expects any new language file to define two > functions... > > - org-babel-execute:lang-name (body params) :: which executes the code > in body according to the header arguments in params, and > > - org-babel-prep-session:ruby (session params) :: which starts an > interactive session in session setting any variables from params OK. I'll look at those... > There are two key language specific features which keep us from treating > all interpreted languages identically. > 1) Org-babel collects the last value of a source-code block to be > returned (see [1]) and this value needs to be collected and > potentially converted into elisp in a language specific manner > 2) Org-babel has support for evaluation in a session allowing > persistence of state between different blocks which use the same > session. I now notice that the :session header argument is not > currently documented on the Worg page. I'll try to add this > documentation soon. The sessions are handled through Emacs comint > buffers which are very language specific. Ahhh, I now comprehend. You're library makes all kinds of source blocks work together as a whole. Great! I now understand your intention! Make that old joke become true: "Emacs is a great OS, it's just missing a good editor" :-D ..... Nachtigall ick h=C3=B6r dir trappsen ... Seriously: There's not that much code to write in the language files. The features seem more than worth it. I just had little snippets in mind... hrm, sorry. > Footnotes:=20 > [1] http://orgmode.org/worg/org-contrib/babel/org-babel.php#results > > [2] http://orgmode.org/worg/org-contrib/babel/org-babel.php#languages OK - not _really_ RTFM :-D I remember I stared at those sections last night - seems I was half asleep already. Best wishes Sebastian