summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstardiviner <numbchild@gmail.com>2020-02-18 20:52:32 +0800
committerJack Kamm <jackkamm@gmail.com>2020-02-19 07:39:28 -0800
commit4f31aa2d3b2d1d8148a44550158f667b67c1fafd (patch)
treea2c9079b8ce9557e106d4301be3e10104755d6c0
parent39f1c1f1e1e2537ca5f89b3929c44bdb41c57da5 (diff)
downloadorg-mode-4f31aa2d3b2d1d8148a44550158f667b67c1fafd.tar.gz
ob-python.el: Fix session initiation when using python-mode.el
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Fixes new session initiation when org-babel-python-mode is python-mode.el.
-rw-r--r--lisp/ob-python.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 11c8fc5..dbcfac0 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -30,7 +30,7 @@
(require 'ob)
(require 'org-macs)
-(declare-function py-shell "ext:python-mode" (&optional argprompt))
+(declare-function py-shell "ext:python-mode" (&rest args))
(declare-function py-toggle-shells "ext:python-mode" (arg))
(declare-function run-python "ext:python" (&optional cmd dedicated show))
@@ -208,8 +208,8 @@ then create. Return the initialized session."
"^\\*\\([^*]+\\)\\*$" "\\1" python-buffer)
(concat "Python-" (symbol-name session))))
(py-which-bufname bufname))
- (py-shell)
- (setq python-buffer (org-babel-python-with-earmuffs bufname))))
+ (setq python-buffer (org-babel-python-with-earmuffs bufname))
+ (py-shell nil nil t org-babel-python-command python-buffer nil nil t nil)))
(t
(error "No function available for running an inferior Python")))
(setq org-babel-python-buffers