mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-06 16:01:37 -05:00
Replacement for jupyter-conn-id
This commit is contained in:
parent
dc91912d5b
commit
3e40fde7ec
2 changed files with 10 additions and 3 deletions
|
@ -67,9 +67,6 @@ connected to.")
|
|||
(cl-defmethod jupyter-stop ((io function) &optional _channel)
|
||||
(jupyter-send io 'stop))
|
||||
|
||||
(defun jupyter-conn-id (conn)
|
||||
(funcall (jupyter-connection-id conn)))
|
||||
|
||||
;;;; `jupyter-connection'
|
||||
|
||||
(cl-defgeneric jupyter-connection (thing)
|
||||
|
|
|
@ -49,6 +49,16 @@
|
|||
"Return non-nil if KERNEL has been launched."
|
||||
(and (jupyter-kernel-session kernel) t))
|
||||
|
||||
(cl-defmethod cl-print-object ((kernel jupyter-kernel) stream)
|
||||
(princ (format "#<jupyter-kernel %s%s>"
|
||||
(jupyter-kernelspec-name (jupyter-kernel-spec kernel))
|
||||
(if (jupyter-alive-p kernel)
|
||||
(concat " " (truncate-string-to-width
|
||||
(jupyter-session-id (jupyter-kernel-session kernel))
|
||||
9 nil nil "…"))
|
||||
""))
|
||||
stream))
|
||||
|
||||
(cl-defgeneric jupyter-kernel (&rest args)
|
||||
"Return a kernel constructed from ARGS.
|
||||
ARGS are keyword arguments used to initialize the returned
|
||||
|
|
Loading…
Add table
Reference in a new issue