Hi Myles, thanks for digging into this.
I'm copying Andreas as the maintainer of python-mode.el. Myles English <mylesengl...@gmail.com> writes: > --- lisp/ob-python.el > +++ lisp/ob-python.el > @@ -32,7 +32,7 @@ > > (declare-function org-remove-indentation "org" ) > (declare-function py-shell "ext:python-mode" (&optional argprompt)) > -(declare-function py-toggle-shells "ext:python-mode" (arg)) > +(declare-function py-toggle-shell "ext:python-mode" (arg)) If this function's name changed, there should be an alias in python-mode.el. > (declare-function run-python "ext:python" (&optional cmd noshow new)) > > (defvar org-babel-tangle-lang-exts) > @@ -162,16 +162,17 @@ then create. Return the initialized session." > ;; Make sure that py-which-bufname is initialized, as otherwise > ;; it will be overwritten the first time a Python buffer is > ;; created. > - (py-toggle-shells py-default-interpreter) > + (py-toggle-shell py-default-interpreter) > ;; `py-shell' creates a buffer whose name is the value of > ;; `py-which-bufname' with '*'s at the beginning and end > (let* ((bufname (if (and python-buffer (buffer-live-p python-buffer)) > (replace-regexp-in-string ;; zap surrounding * > "^\\*\\([^*]+\\)\\*$" "\\1" python-buffer) > (concat "Python-" (symbol-name session)))) > - (py-which-bufname bufname)) > - (py-shell) > - (setq python-buffer (concat "*" bufname "*")))) > + (py-buffer-name bufname)) > + (setq python-buffer (concat "*" bufname "*")) > + (py-shell nil nil nil nil nil python-buffer) > + )) The docstring of py-shell doesn't say much about why python-buffer would be needed as an argument here. Is it so? If yes, we need to make this compatible with previous versions of python-mode.el. (The argument PY-BUFFER-NAME is not documented in latest python-mode.el) Andreas, can you help sorting this out? Thanks, -- Bastien