Skip to content

Commit 0b960b2

Browse files
committed
Make documentation consistent when mentioning request types
* jupyter-client.el (jupyter-inspect) (jupyter-code-context, jupyter-kernel-info): Do it. * jupyter-mime.el (jupyter-display-ids) (jupyter-update-display): Do it. * jupyter-repl.el (jupyter-repl-allow-RET-when-busy): Do it.
1 parent 4a272ea commit 0b960b2

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

jupyter-client.el

+14-12
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ called interactively."
11961196

11971197
(cl-defgeneric jupyter-inspect (code &optional pos buffer detail)
11981198
"Inspect CODE.
1199-
Send an `:inspect-request' with the `jupyter-current-client' and
1199+
Send an inspect_request with the `jupyter-current-client' and
12001200
display the results in a BUFFER.
12011201
12021202
CODE is the code to inspect and POS is your position in the CODE.
@@ -1274,9 +1274,9 @@ DETAIL is the detail level to use for the request and defaults to
12741274
CODE is the required context for TYPE (either `inspect' or
12751275
`completion') and POS is the relative position of `point' within
12761276
CODE. Depending on the current context such as the current
1277-
`major-mode', CODE and POS will be used for `:complete-request's
1278-
originating from `jupyter-completion-at-point' and
1279-
`:inspect-request's from `jupyter-inspect-at-point'.
1277+
`major-mode', CODE and POS will be used for a complete_request
1278+
originating from `jupyter-completion-at-point' and an
1279+
inspect_request from `jupyter-inspect-at-point'.
12801280
12811281
The default methods return the `jupyter-line-or-region-context'.")
12821282

@@ -1700,26 +1700,28 @@ function `jupyter-kernel-language-mode-properties'.")
17001700
(defun jupyter-kernel-info (client)
17011701
"Return the kernel info plist of CLIENT.
17021702
Return CLIENT's kernel-info slot if non-nil. Otherwise send a
1703-
`:kernel-info-request' to CLIENT's kernel, set CLIENT's
1703+
kernel_info_request to CLIENT's kernel, set CLIENT's
17041704
kernel-info slot to the plist retrieved from the kernel, and
17051705
return it.
17061706
17071707
If the kernel CLIENT is connected to does not respond to a
1708-
`:kernel-info-request', raise an error.
1708+
kernel_info_request, raise an error.
17091709
1710-
Note, the value of the :name key in the :language_info property
1711-
list is a symbol as opposed to a string for the purposes of
1712-
method dispatching. Also all instances of \" \" in the language
1713-
name are changed to \"-\" and all uppercase characters lowered."
1710+
Note, the value of the `:name' key in the `:language_info'
1711+
property list is a symbol as opposed to a string for the purposes
1712+
of method dispatching. Also all instances of \" \" in the
1713+
language name are changed to \"-\" and all uppercase characters
1714+
lowered."
17141715
(cl-check-type client jupyter-kernel-client)
17151716
;; TODO: This needs to be reset when a client is disconnected. This
17161717
;; should be part of the connection process.
17171718
(or (oref client kernel-info)
17181719
(progn
17191720
(message "Requesting kernel info...")
17201721
;; Don't generate this request in an unknown buffer. This is
1721-
;; mainly so that the Org client's generate-request doesn't
1722-
;; confuse it for an execute_request in the Org buffer.
1722+
;; mainly so that the Org client's `jupyter-generate-request'
1723+
;; doesn't confuse it for an execute_request in the Org
1724+
;; buffer.
17231725
(jupyter-with-client-buffer client
17241726
(jupyter-run-with-client client
17251727
(jupyter-mlet* ((msg (jupyter-reply

jupyter-mime.el

+6-7
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ Wider images are resized. Special value 0 means no limit."
6161
(defvar-local jupyter-display-ids nil
6262
"A hash table of display IDs.
6363
Display IDs are implemented by setting the text property,
64-
`jupyter-display', to the display ID requested by a
65-
`:display-data' message. When a display is updated from an
66-
`:update-display-data' message, the display ID from the initial
67-
`:display-data' message is retrieved from this table and used to
68-
find the display in the REPL buffer. See
69-
`jupyter-update-display'.")
64+
`jupyter-display', to the display ID requested by a display_data
65+
message. When a display is updated from an update_display_data
66+
message, the display ID from the initial display_data message is
67+
retrieved from this table and used to find the display in the
68+
REPL buffer. See `jupyter-update-display'.")
7069

7170
;;; Macros
7271

@@ -627,7 +626,7 @@ property."
627626

628627
(cl-defmethod jupyter-update-display ((display-id string) data &optional metadata)
629628
"Update the display with DISPLAY-ID using DATA.
630-
DATA and METADATA have the same meaning as in a `:display-data'
629+
DATA and METADATA have the same meaning as in a display_data
631630
message."
632631
(let ((id (and jupyter-display-ids
633632
(gethash display-id jupyter-display-ids))))

jupyter-repl.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ position."
135135
"Allow RET to insert a newline when the kernel is busy.
136136
Normally when the kernel is busy, pressing RET at an input cell
137137
is disallowed. This is because, when the kernel is busy, it does
138-
not respond to an `:is-complete-request' message and that message
139-
is used to avoid sending incomplete code to the kernel.
138+
not respond to an is_complete_request message and that message is
139+
used to avoid sending incomplete code to the kernel.
140140
141141
If this variable is non-nil, RET is allowed to insert a newline.
142142
In this case, pressing RET on an empty line, i.e. RET RET, will

0 commit comments

Comments
 (0)