mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 23:41:38 -05:00
Add jupyter-request-inhibit-handlers
for convenience
This commit is contained in:
parent
068f09fa9e
commit
bcaa7ef2d7
1 changed files with 13 additions and 0 deletions
|
@ -677,6 +677,19 @@ for the heartbeat channel."
|
|||
(sleep-for 0 10)))
|
||||
(jupyter-request--id req))
|
||||
|
||||
(defun jupyter-request-inhibit-handlers (req)
|
||||
"Inhibit the execution of a `jupyter-kernel-client's handlers for REQ.
|
||||
Set `jupyter-request-run-handlers-p' to nil for REQ and return
|
||||
REQ. This function is intended to be a convenience function so
|
||||
that you can do:
|
||||
|
||||
(jupyter-add-callback 'execute-reply
|
||||
(jupyter-request-inhibit-handlers
|
||||
(jupyter-execute-request client ...))
|
||||
(lambda (msg) ...))"
|
||||
(setf (jupyter-request-run-handlers-p req) nil)
|
||||
req)
|
||||
|
||||
(defun jupyter-request-run-callbacks (req msg)
|
||||
"Run the MSG callbacks of REQ."
|
||||
(when req
|
||||
|
|
Loading…
Add table
Reference in a new issue