From 0ff69491cdc7474cef41add4139f20b3918ea1d3 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Tue, 27 Aug 2019 13:48:01 -0500 Subject: [PATCH] jupyter-inspect: Fix commentary --- jupyter-client.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jupyter-client.el b/jupyter-client.el index 08a8c4b..6d54511 100644 --- a/jupyter-client.el +++ b/jupyter-client.el @@ -1478,15 +1478,18 @@ DETAIL is the detail level to use for the request and defaults to (setq jupyter-current-client client) (help-setup-xref (list - ;; We find the client based on session so that we don't - ;; capture a reference to the client. + ;; Don't capture a strong reference to the client + ;; object since we don't know when this reference will + ;; be cleaned up. (let ((ref (jupyter-weak-ref client))) (lambda () (let ((jupyter-current-client (jupyter-weak-ref-resolve ref))) (if jupyter-current-client (jupyter-inspect code pos nil detail) - (error "Client for session has been removed")))))) + ;; TODO: Skip over this xref, need to figure + ;; out if going forward or backward first. + (error "Client has been removed")))))) nil) (jupyter-insert msg))))) (message "Nothing found for %s"