Andreas Röhler <andreas.roeh...@easy-emacs.de> wrote: > org-babel-execute-src-block: No org-babel-execute function for python! > > When evaluating the following block C-c C-c starting from emacs -Q > > #+BEGIN_SRC python > a = 5 > > b = 16 > > print(a + b) > #+END_SRC > > the error message from title appears > > GNU Emacs 24.3.50.1 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of 2013-02-20 > > Patch attached. > diff --git a/lisp/ob-python.el b/lisp/ob-python.el > index f2806c7..fb00053 100644 > --- a/lisp/ob-python.el > +++ b/lisp/ob-python.el > (t > (error "No function available for running an inferior Python"))) > (setq org-babel-python-buffers > @@ -249,7 +252,8 @@ last statement in BODY, as elisp." > (org-babel-trim body)) > "[\r\n]") "\n") > (org-babel-process-file-name tmp-file 'noquote)))) > - (org-babel-eval-read-file tmp-file)))))) > + ;; (org-babel-eval-read-file tmp-file) > + ))))) > > (defun org-babel-python-evaluate-session > (session body &optional result-type result-params)
I don't understand: afaict the problem is that starting with emacs -Q, python is not enabled as a babel language: you need to (require 'ox-python) somewhere. Maybe I'm missing something but what's this patch supposed to do? Nick