From 3734b2d3a4017dfd3a8064e59473493dc99aeb1d Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Mon, 8 Oct 2018 19:11:31 -0500 Subject: [PATCH] jupyter-repl-associate-buffer: Fix interactive argument --- jupyter-repl.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jupyter-repl.el b/jupyter-repl.el index 7fcef39..a425022 100644 --- a/jupyter-repl.el +++ b/jupyter-repl.el @@ -2480,8 +2480,10 @@ If CLIENT is a buffer or the name of a buffer, use the (interactive (list (let ((repls (jupyter-repl-available-repl-buffers major-mode))) - (if repls (completing-read "jupyter-repl: " repls nil t) - nil)))) + (when repls + (with-current-buffer + (completing-read "jupyter-repl: " repls nil t) + jupyter-current-client))))) (if (not client) (when (y-or-n-p "No REPL for `major-mode' exists. Start one? ") (call-interactively #'run-jupyter-repl))