Update comments

This commit is contained in:
Nathaniel Nicandro 2018-10-16 14:59:54 -05:00
parent 0807fd7b83
commit 288fb17ece
3 changed files with 16 additions and 5 deletions

View file

@ -279,11 +279,6 @@ a response after 5 `time-to-dead' periods."
(defun jupyter-hb--send-ping (channel &optional counter)
(unless (oref channel paused)
(zmq-send (oref channel socket) "ping")
;; TODO: How to avoid running when idle for a long
;; time? Would we even want that, when we keep checking
;; and we are idle Emacs consistently spends a few
;; percent of CPU time, but is this really necessary?
;; Maybe extend the time by some factor when idle.
(run-with-timer
(oref channel time-to-dead) nil
(lambda ()

View file

@ -636,6 +636,13 @@ by `jupyter--ioloop'."
(when jupyter--debug
(message "STOPPING-CHANNEL: %s" ctype))
(let ((channel (jupyter--get-channel client ctype)))
;; TODO: Wrap this in an async channel method, maybe
;; re-use `jupyter-stop-channel'. On the first call,
;; when we send a stop channel message to the
;; subprocess we set the status to pending, then
;; here once we know the channel was stopped, we
;; call `jupyter-stop-channel' again and it updates
;; the status to stopped. Seems too complicated.
(oset channel status 'stopped)))
('(start)
(when jupyter--debug

View file

@ -683,6 +683,8 @@ When no valid mimetype is present in DATA, a warning is shown."
(jupyter-repl-newline))
(t (warn "No supported mimetype found %s" mimetypes)))))
;; FIXME: The support for display IDs has not really been tested.
(defun jupyter-repl-insert-data-with-id (display-id data metadata)
"Associate DISPLAY-ID with DATA when inserting DATA.
DATA and METADATA have the same meaning as in
@ -2790,6 +2792,13 @@ Otherwise, in a non-interactive call, return the
(cl-destructuring-bind (_manager client)
(jupyter-start-new-kernel kernel-name client-class)
(jupyter-repl--new-repl client repl-name)
;; TODO: An alist mapping kernel languages to their
;; corresponding major modes in Emacs. This ways we can
;; error out earlier before starting the REPL. The
;; reason why this can't be done is because we use the
;; extension key of the kernel-info to get the major
;; mode using `auto-mode-alist'. See
;; `jupyter-repl-kernel-language-mode-properties'.
(when (and associate-buffer
(eq major-mode (jupyter-repl-language-mode client)))
(jupyter-repl-associate-buffer client))