From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [ANN] Org-babel integrated into Org-mode Date: Thu, 24 Jun 2010 09:27:38 -0700 Message-ID: <87iq585rb9.fsf@gmail.com> References: <87wrtp78rg.fsf@gmail.com> <87aaqkvqdi.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=58730 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORpHF-00073h-PB for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 12:27:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORpHE-0004jM-9L for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 12:27:45 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:59016) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORpHE-0004j4-3E for emacs-orgmode@gnu.org; Thu, 24 Jun 2010 12:27:44 -0400 Received: by pxi17 with SMTP id 17so3726164pxi.0 for ; Thu, 24 Jun 2010 09:27:42 -0700 (PDT) In-Reply-To: <87aaqkvqdi.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Thu, 24 Jun 2010 09:31:05 +0200") 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: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi S=C3=A9bastien, S=C3=A9bastien Vauban writes: [...] > > For my own understanding, what's the status of `Org-babel-screen', for wh= ich > I've never been able to understand completely all the differences with `s= h' in > `Org-babel'? > I believe screen has more of a focus on sustained interaction with an interactive terminal, although to be honest I haven't really used it and can't say for sure. Benjamin Andresen, the author, may have a more satisfying answer for you. > > Second, a problem with the following code: > > ;; Org-babel needs to be told to recognize awk source code blocks a= nd > ;; how they should be tangled, which can be accomplished with the > ;; following: > (org-babel-add-interpreter "awk") > (add-to-list 'org-babel-tangle-langs '("awk" "awk")) > > (org-babel-add-interpreter "fortran") > (add-to-list 'org-babel-tangle-langs '("fortran" "f")) > > ;; ;; org-babel panics when trying to evaluate ruby code blocks bec= ause > ;; ;; you don't have the required ruby executables available on your > ;; ;; system. Probably the best way to deal with this is to remove = ruby > ;; ;; from the list of languages supported by babel: > ;; (setq org-babel-interpreters (delete "ruby" org-babel-interprete= rs)) > > ;; make pre-built helper functions (`lob') available > ;; (org-babel-load-library-of-babel) > > ;; mapping between languages (listings in LaTeX) and their major mo= de > ;; (in Emacs) > (setq org-src-lang-modes > '(("ocaml" . tuareg) > ("elisp" . emacs-lisp) > ;; ("Delphi" . perl) > ("ditaa" . artist) > ("asymptote" . asy) > ("dot" . fundamental))) > ;; ) > > Neither org-babel-add-interpreter, neither its shorter version do exist n= ow? > Yes, thanks for bringing this up! I realized last night that I forgot to mention this in the announcement. We have simplified the handling of languages in Org-babel, in that the org-babel-interpreters and org-babel-tangle-langs variables have both been removed. Rather than keeping explicit lists of supported languages, Babel will now try to work with every language, and will only give up if it can't find a needed function (e.g. if there is no org-babel-execute:foo function defined then babel will give up on evaluating a foo code block). The only remaining language list is `org-babel-tangle-lang-exts' which can optionally be used to associate file extensions with language names, but is *not* required for evaluation or tangling. Given this, your configuration from above could be rewritten as --8<---------------cut here---------------start------------->8--- ;; Org-babel now needs less hand-holding :) however it could be ;; useful to know extensions for some languages (add-to-list 'org-babel-tangle-lang-exts '("fortran" . "f")) ;; mapping between languages (listings in LaTeX) and their major mode ;; (in Emacs) (setq org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ;; ("Delphi" . perl) ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental))) ;; ) --8<---------------cut here---------------end--------------->8--- Cheers -- Eric > > Best regards, > Seb