Move some code to a more appropriate place

This commit is contained in:
Nathaniel Nicandro 2020-11-21 20:04:08 -06:00
parent 0b32635a3a
commit 07bdc46a87

View file

@ -448,6 +448,9 @@ when it is idle."
(jupyter-with-client jupyter-current-client (jupyter-with-client jupyter-current-client
(let ((client jupyter-current-client)) (let ((client jupyter-current-client))
(jupyter-mlet* ((req io-req)) (jupyter-mlet* ((req io-req))
(when (string= (jupyter-request-type req)
"execute_request")
(jupyter-server-mode-set-client client))
(jupyter-run-with-io (jupyter-run-with-io
(jupyter-request-message-publisher req) (jupyter-request-message-publisher req)
(jupyter-subscribe (jupyter-subscribe
@ -529,8 +532,6 @@ when it is idle."
(jupyter-publish (jupyter-publish
(list 'send ch type content (list 'send ch type content
(jupyter-request-id req))))) (jupyter-request-id req)))))
(when (string= type "execute")
(jupyter-server-mode-set-client jupyter-current-client))
req))))) req)))))
(cl-defun jupyter-request (type &rest content) (cl-defun jupyter-request (type &rest content)