mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-04 15:41:37 -05:00
Raise an error when the current-buffer' has no REPL client in
jupyter-repl-pop-to-buffer`
This commit is contained in:
parent
ee69147b72
commit
c80b62bdc6
1 changed files with 8 additions and 4 deletions
|
@ -1715,11 +1715,15 @@ Set the execution-count slot of `jupyter-repl-current-client' to
|
|||
;;; `jupyter-repl-interaction-mode'
|
||||
|
||||
(defun jupyter-repl-pop-to-buffer ()
|
||||
"Switch to the REPL buffer associated with `jupyter-repl-current-client'."
|
||||
"Switch to the REPL buffer associated with the `current-buffer'.
|
||||
Switch to the REPL buffer of the `jupyter-repl-current-client'
|
||||
for the `current-buffer'."
|
||||
(interactive)
|
||||
(with-jupyter-repl-buffer jupyter-repl-current-client
|
||||
(goto-char (point-max))
|
||||
(pop-to-buffer (current-buffer))))
|
||||
(if jupyter-repl-current-client
|
||||
(with-jupyter-repl-buffer jupyter-repl-current-client
|
||||
(goto-char (point-max))
|
||||
(pop-to-buffer (current-buffer)))
|
||||
(error "Buffer not associated with a REPL, see `jupyter-repl-associate-buffer'")))
|
||||
|
||||
(defun jupyter-repl-available-repl-buffers (&optional mode)
|
||||
"Get a list of REPL buffers that are connected to live kernels.
|
||||
|
|
Loading…
Add table
Reference in a new issue