* BUG org-babel-execute-src-block: No org-babel-execute function for python!
@ 2013-02-26 13:42 Andreas Röhler
2013-02-26 13:48 ` Nick Dokos
2013-02-26 13:49 ` Bastien
0 siblings, 2 replies; 9+ messages in thread
From: Andreas Röhler @ 2013-02-26 13:42 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
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.
[-- Attachment #2: org-babel-python-evaluate-external-process_ob-python.el.patch --]
[-- Type: text/x-patch, Size: 615 bytes --]
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)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 13:42 BUG org-babel-execute-src-block: No org-babel-execute function for python! Andreas Röhler
@ 2013-02-26 13:48 ` Nick Dokos
2013-02-26 13:49 ` Bastien
1 sibling, 0 replies; 9+ messages in thread
From: Nick Dokos @ 2013-02-26 13:48 UTC (permalink / raw)
To: =?ISO-8859-15?Q?Andreas_R=F6hler?=; +Cc: emacs-orgmode
Andreas Röhler <andreas.roehler@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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 13:42 BUG org-babel-execute-src-block: No org-babel-execute function for python! Andreas Röhler
2013-02-26 13:48 ` Nick Dokos
@ 2013-02-26 13:49 ` Bastien
2013-02-26 15:42 ` Andreas Röhler
1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2013-02-26 13:49 UTC (permalink / raw)
To: Andreas Röhler; +Cc: emacs-orgmode
Hi Andreas,
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> 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
You need
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)))
See (info "(Org)Languages")
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 13:49 ` Bastien
@ 2013-02-26 15:42 ` Andreas Röhler
2013-02-26 16:00 ` Ista Zahn
2013-02-26 16:00 ` Bastien
0 siblings, 2 replies; 9+ messages in thread
From: Andreas Röhler @ 2013-02-26 15:42 UTC (permalink / raw)
To: Bastien; +Cc: Nick Dokos, emacs-orgmode
Am 26.02.2013 14:49, schrieb Bastien:
> Hi Andreas,
>
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> 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
>
> You need
>
> (org-babel-do-load-languages
> 'org-babel-load-languages
> '((python . t)))
>
> See (info "(Org)Languages")
>
> HTH,
>
Bugs exists after loading that.
Please tell if you need more info.
Andreas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 15:42 ` Andreas Röhler
@ 2013-02-26 16:00 ` Ista Zahn
2013-02-26 19:34 ` Andreas Röhler
2013-02-26 16:00 ` Bastien
1 sibling, 1 reply; 9+ messages in thread
From: Ista Zahn @ 2013-02-26 16:00 UTC (permalink / raw)
To: Andreas Röhler; +Cc: Bastien, Nick Dokos, emacs-orgmode
On Tue, Feb 26, 2013 at 10:42 AM, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:
> Am 26.02.2013 14:49, schrieb Bastien:
>
>> Hi Andreas,
>>
>> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>>
>>> 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
>>
>>
>> You need
>>
>> (org-babel-do-load-languages
>> 'org-babel-load-languages
>> '((python . t)))
>>
>> See (info "(Org)Languages")
>>
>> HTH,
>>
>
> Bugs exists after loading that.
What is the nature of the bugs?
> Please tell if you need more info.
what is the result of 'M-x org-version'?
Also, try this simple test and report the results:
1. start emaces with emacs -q
2. visit a new file with a .org extension, e.g., tmp.org
3. paste this in:
8<--------------------cut here<--------------------8<
Place cursor in the code block below and press C-c C-c
#+begin_src emacs-lisp :exports none
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)))
#+end_src
#+BEGIN_SRC python :results output
a = 5
b = 16
print(a + b)
#+END_SRC
8<--------------------cut here<--------------------8<
4. place the cursor inside the first code block and press C-c C-c
5. place the cursor inside the second code block and press C-c C-c
6. let us know what happens
Best,
Ista
>
> Andreas
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 16:00 ` Ista Zahn
@ 2013-02-26 19:34 ` Andreas Röhler
2013-02-26 19:50 ` Thomas S. Dye
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Röhler @ 2013-02-26 19:34 UTC (permalink / raw)
To: Ista Zahn; +Cc: Bastien, Nick Dokos, emacs-orgmode
Am 26.02.2013 17:00, schrieb Ista Zahn:
> On Tue, Feb 26, 2013 at 10:42 AM, Andreas Röhler
> <andreas.roehler@easy-emacs.de> wrote:
>> Am 26.02.2013 14:49, schrieb Bastien:
>>
>>> Hi Andreas,
>>>
>>> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>>>
>>>> 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
>>>
>>>
>>> You need
>>>
>>> (org-babel-do-load-languages
>>> 'org-babel-load-languages
>>> '((python . t)))
>>>
>>> See (info "(Org)Languages")
>>>
>>> HTH,
>>>
>>
>> Bugs exists after loading that.
>
> What is the nature of the bugs?
>
>> Please tell if you need more info.
>
> what is the result of 'M-x org-version'?
>
> Also, try this simple test and report the results:
> 1. start emaces with emacs -q
> 2. visit a new file with a .org extension, e.g., tmp.org
> 3. paste this in:
> 8<--------------------cut here<--------------------8<
> Place cursor in the code block below and press C-c C-c
>
> #+begin_src emacs-lisp :exports none
> (org-babel-do-load-languages
> 'org-babel-load-languages
> '((python . t)))
> #+end_src
>
> #+BEGIN_SRC python :results output
> a = 5
> b = 16
> print(a + b)
> #+END_SRC
> 8<--------------------cut here<--------------------8<
> 4. place the cursor inside the first code block and press C-c C-c
> 5. place the cursor inside the second code block and press C-c C-c
> 6. let us know what happens
>
> Best,
> Ista
>
>
>>
>> Andreas
>>
>
Hi Ista,
Org-mode version is 7.9.3e (7.9.3e-3-gb07a9b
i.e. loading current trunk.
When following your prescription, bug does not occur.
My from way to load languages was
(org-babel-do-load-languages
'org-babel-do-load-languages
'(
(sh . t)
(python . t)
))
If I load this first, then your print-example shows error like indicated in subject line.
Something wrong with this code?
Thanks all,
Andreas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 19:34 ` Andreas Röhler
@ 2013-02-26 19:50 ` Thomas S. Dye
2013-02-26 20:00 ` Andreas Röhler
0 siblings, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2013-02-26 19:50 UTC (permalink / raw)
To: Andreas Röhler; +Cc: Bastien, Nick Dokos, emacs-orgmode, Ista Zahn
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Hi Ista,
>
> Org-mode version is 7.9.3e (7.9.3e-3-gb07a9b
>
> i.e. loading current trunk.
>
> When following your prescription, bug does not occur.
>
> My from way to load languages was
>
> (org-babel-do-load-languages
> 'org-babel-do-load-languages
> '(
> (sh . t)
> (python . t)
> ))
>
> If I load this first, then your print-example shows error like indicated in subject line.
>
> Something wrong with this code?
>
I think it should be 'org-babel-load-languages instead of
'org-babel-do-load-languages.
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 19:50 ` Thomas S. Dye
@ 2013-02-26 20:00 ` Andreas Röhler
0 siblings, 0 replies; 9+ messages in thread
From: Andreas Röhler @ 2013-02-26 20:00 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: Bastien, Nick Dokos, emacs-orgmode, Ista Zahn
Am 26.02.2013 20:50, schrieb Thomas S. Dye:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> Hi Ista,
>>
>> Org-mode version is 7.9.3e (7.9.3e-3-gb07a9b
>>
>> i.e. loading current trunk.
>>
>> When following your prescription, bug does not occur.
>>
>> My from way to load languages was
>>
>> (org-babel-do-load-languages
>> 'org-babel-do-load-languages
>> '(
>> (sh . t)
>> (python . t)
>> ))
>>
>> If I load this first, then your print-example shows error like indicated in subject line.
>>
>> Something wrong with this code?
>>
>
> I think it should be 'org-babel-load-languages instead of
> 'org-babel-do-load-languages.
>
> Tom
>
Argh, thanks. Sorry for the noice,
Andreas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BUG org-babel-execute-src-block: No org-babel-execute function for python!
2013-02-26 15:42 ` Andreas Röhler
2013-02-26 16:00 ` Ista Zahn
@ 2013-02-26 16:00 ` Bastien
1 sibling, 0 replies; 9+ messages in thread
From: Bastien @ 2013-02-26 16:00 UTC (permalink / raw)
To: Andreas Röhler; +Cc: Nick Dokos, emacs-orgmode
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>> (org-babel-do-load-languages
>> 'org-babel-load-languages
>> '((python . t)))
>>
>> See (info "(Org)Languages")
>>
> Bugs exists after loading that.
> Please tell if you need more info.
Please give a reproducible recipe.
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-02-26 20:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 13:42 BUG org-babel-execute-src-block: No org-babel-execute function for python! Andreas Röhler
2013-02-26 13:48 ` Nick Dokos
2013-02-26 13:49 ` Bastien
2013-02-26 15:42 ` Andreas Röhler
2013-02-26 16:00 ` Ista Zahn
2013-02-26 19:34 ` Andreas Röhler
2013-02-26 19:50 ` Thomas S. Dye
2013-02-26 20:00 ` Andreas Röhler
2013-02-26 16:00 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).