From 05fd6cc4c53d78b0531af1e832536afb1553a54b Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Tue, 20 Mar 2018 23:18:50 +0100 Subject: [PATCH] Adapt python-shell-buffer-name in org-src edit blocks. --- ob-ipython.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ob-ipython.el b/ob-ipython.el index 043fb9a..417ca33 100644 --- a/ob-ipython.el +++ b/ob-ipython.el @@ -566,6 +566,10 @@ have previously been configured." (ob-ipython--create-kernel (->> info (nth 2) (assoc :session) cdr ob-ipython--normalize-session) (->> info (nth 2) (assoc :kernel) cdr)) + ;; Support for python.el's "send-code" commands within edit buffers. + (setq-local python-shell-buffer-name + (format "Python:%s" (->> info (nth 2) (assoc :session) cdr + ob-ipython--normalize-session))) (ob-ipython-mode +1)) (defun ob-ipython--normalize-session (session)