mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 23:41:38 -05:00
Simplify wording of jupyter-add-callback
documentation
This commit is contained in:
parent
8784b9fcc3
commit
ca6c2ae37a
1 changed files with 7 additions and 9 deletions
|
@ -677,19 +677,17 @@ run when MSG-TYPE is received for REQ."
|
||||||
(defun jupyter-add-callback (req msg-type cb &rest callbacks)
|
(defun jupyter-add-callback (req msg-type cb &rest callbacks)
|
||||||
"Add a callback to run when a message is received for a request.
|
"Add a callback to run when a message is received for a request.
|
||||||
REQ is a `jupyter-request' returned by one of the request methods
|
REQ is a `jupyter-request' returned by one of the request methods
|
||||||
of a `jupyter-kernel-client'. MSG-TYPE is a keyword corresponding
|
of a `jupyter-kernel-client'. MSG-TYPE is one of the keys in
|
||||||
to one of the keys in `jupyter-message-types'. CB is the callback
|
`jupyter-message-types'. CB is the callback function to run when
|
||||||
function which will run with a single argument, a message whose
|
a message with MSG-TYPE is received for REQ.
|
||||||
`jupyter-message-parent-id' is `equal' to the
|
|
||||||
`jupyter-request-id' of REQ and whose `jupyter-message-type'
|
|
||||||
corresponds to the value of MSG-TYPE in `jupyter-message-types'.
|
|
||||||
MSG-TYPE can also be a list, in which case run CB for every
|
MSG-TYPE can also be a list, in which case run CB for every
|
||||||
MSG-TYPE in the list. If MSG-TYPE is t, then run CB for every
|
MSG-TYPE in the list. If MSG-TYPE is t, run CB for every message
|
||||||
message received for REQ.
|
received for REQ.
|
||||||
|
|
||||||
Any additional arguments to `jupyter-add-callback' are
|
Any additional arguments to `jupyter-add-callback' are
|
||||||
interpreted as additional CALLBACKS to add to REQ. So to add
|
interpreted as additional CALLBACKS to add to REQ. So to add
|
||||||
multiple callbacks to a request you would do
|
multiple callbacks you would do
|
||||||
|
|
||||||
(jupyter-add-callback
|
(jupyter-add-callback
|
||||||
(jupyter-execute-request client :code \"1 + 2\")
|
(jupyter-execute-request client :code \"1 + 2\")
|
||||||
|
|
Loading…
Add table
Reference in a new issue