Hi

First of all thanks for integrating Org-babel into Org-mode.

But for the less fluent elisp and org-mode users, I am slightly confused in the changes necessary on my side.

I have the following in my emacs.org file:


#+begin_src emacs-lisp
  (require 'org-babel-R)         ;; requires R and ess-mode
  ;; (require 'org-babel-ruby)      ;; requires ruby, irb, ruby-mode, and inf-ruby
  (require 'org-babel-python)    ;; requires python, and python-mode
  ;; (require 'org-babel-clojure)   ;; requires clojure, clojure-mode, swank-clojure and slime
#+end_src
*** Start babel
#+begin_src emacs-lisp
  (org-babel-load-library-of-babel)
#+end_src
*** Customization of sh
  set shebang for sh script to "#!/bin/bash" and exclude additional comments (t)
#+begin_src emacs-lisp
  (setq org-babel-tangle-langs
  (cons
  '("sh" "sh" "#!/bin/bash" t)
  (remove-if (lambda (el) (string= (car el) "sh")) org-babel-tangle-langs)))
#+end_src
*** Customization of R
  set shebang for R script to "" and exclude additional comments (t)
#+begin_src emacs-lisp
  (setq org-babel-tangle-langs
  (cons
  '("R" "R")
  (remove-if (lambda (el) (string= (car el) "R")) org-babel-tangle-langs)))
#+end_src

which custimizes the shebang creation and the comments in the tangled file. Do I have to change any settings, and if yes, how? The previous conversation seems to say "yes, it needs to be changed", but I don't understand what and how.


Thanks,

Rainer.
On Thu, Jun 24, 2010 at 6:27 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
Hi Sébastien,

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

[...]
>
> For my own understanding, what's the status of `Org-babel-screen', for which
> I've never been able to understand completely all the differences with `sh' 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 and
>       ;; 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 because
>       ;; ;; 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-interpreters))
>
>       ;; make pre-built helper functions (`lob') available
>       ;; (org-babel-load-library-of-babel)
>
>       ;; 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)))
>       ;; )
>
> Neither org-babel-add-interpreter, neither its shorter version do exist now?
>

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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



--
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          Rainer@krugs.de

Skype:          RMkrug
Google:         R.M.Krug@gmail.com