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:
Eric Schulte 2013-03-29 10:31:37 -06:00
parent df0c8a3bc4
commit 9e9edd4830
1 changed files with 3 additions and 2 deletions

View File

@ -151,7 +151,7 @@ Emacs-lisp table, otherwise return the results as a string."
res))
(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)
"Return the buffer associated with SESSION."
@ -170,7 +170,8 @@ then create. Return the initialized session."
((and (eq 'python org-babel-python-mode)
(fboundp 'run-python)) ; python.el
(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)))
((and (eq 'python-mode org-babel-python-mode)
(fboundp 'py-shell)) ; python-mode.el