forked from mirrors/org-mode
change the default python buffer name
Working to fix a bug introduced by recent upstream changes in python.el in Emacs. * lisp/ob-python.el (org-babel-python-buffers): Change the default python buffer name. (org-babel-python-initiate-session-by-key): Pass Python buffer names to the new `run-python' command.
This commit is contained in:
parent
df0c8a3bc4
commit
9e9edd4830
|
@ -151,7 +151,7 @@ Emacs-lisp table, otherwise return the results as a string."
|
||||||
res))
|
res))
|
||||||
(org-babel-script-escape results)))
|
(org-babel-script-escape results)))
|
||||||
|
|
||||||
(defvar org-babel-python-buffers '((:default . nil)))
|
(defvar org-babel-python-buffers '((:default . "*Python*")))
|
||||||
|
|
||||||
(defun org-babel-python-session-buffer (session)
|
(defun org-babel-python-session-buffer (session)
|
||||||
"Return the buffer associated with SESSION."
|
"Return the buffer associated with SESSION."
|
||||||
|
@ -170,7 +170,8 @@ then create. Return the initialized session."
|
||||||
((and (eq 'python org-babel-python-mode)
|
((and (eq 'python org-babel-python-mode)
|
||||||
(fboundp 'run-python)) ; python.el
|
(fboundp 'run-python)) ; python.el
|
||||||
(if (version< "24.1" emacs-version)
|
(if (version< "24.1" emacs-version)
|
||||||
(run-python org-babel-python-command)
|
(let ((python-shell-buffer-name python-buffer))
|
||||||
|
(run-python org-babel-python-command))
|
||||||
(run-python)))
|
(run-python)))
|
||||||
((and (eq 'python-mode org-babel-python-mode)
|
((and (eq 'python-mode org-babel-python-mode)
|
||||||
(fboundp 'py-shell)) ; python-mode.el
|
(fboundp 'py-shell)) ; python-mode.el
|
||||||
|
|
Loading…
Reference in a new issue