mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-27 07:37:25 +00:00
ob-python.el: Fix compatibility bug.
* ob-python.el (org-babel-python-command): Fix docstring. (org-babel-python-initiate-session-by-key): Fix bug: `run-python' from Emacs >24.1 requires a python command as an argument. Thanks to Myles English for raising this issue.
This commit is contained in:
parent
340f51f723
commit
4a0afac669
@ -44,7 +44,7 @@
|
||||
(defvar org-babel-default-header-args:python '())
|
||||
|
||||
(defvar org-babel-python-command "python"
|
||||
"Name of command for executing Python code.")
|
||||
"Name of the command for executing Python code.")
|
||||
|
||||
(defvar org-babel-python-mode (if (featurep 'xemacs) 'python-mode 'python)
|
||||
"Preferred python mode for use in running python interactively.
|
||||
@ -143,7 +143,9 @@ then create. Return the initialized session."
|
||||
(cond
|
||||
((and (eq 'python org-babel-python-mode)
|
||||
(fboundp 'run-python)) ; python.el
|
||||
(run-python))
|
||||
(if (version< "24.1" emacs-version)
|
||||
(run-python org-babel-python-command)
|
||||
(run-python)))
|
||||
((and (eq 'python-mode org-babel-python-mode)
|
||||
(fboundp 'py-shell)) ; python-mode.el
|
||||
;; Make sure that py-which-bufname is initialized, as otherwise
|
||||
|
Loading…
Reference in New Issue
Block a user