Nathaniel Nicandro
6ea306bcbb
Fix improper uses of eq
and memq
with respect to string constants
2023-06-07 21:34:27 -05:00
Nathaniel Nicandro
7d7cf4716b
Silence cl-defgeneric
warnings
2023-06-07 21:27:25 -05:00
Nathaniel Nicandro
ec7cd1c2fa
Re-implement jupyter-repl-restart-kernel
...
The old version was convoluted. As a bonus, there is now an
implementation of `jupyter-repl-shutdown-kernel` (not bound to any
key).
2023-02-16 08:54:28 -06:00
Nathaniel Nicandro
75211e8c0f
Fix wrong number of arguments
2023-02-15 06:47:08 -06:00
Nathaniel Nicandro
a5390637d1
jupyter-return-delayed
-> jupyter-return
2023-02-13 20:30:20 -06:00
Nathaniel Nicandro
b07f9c5cfe
Ensure a monadic value is returned from a call to jupyter-mlet*
2023-02-13 20:30:20 -06:00
Nathaniel Nicandro
a5399f793c
Rename jupyter-send
to jupyter-sent
...
`jupyter-send` is already defined as a method which takes more than
one argument and I couldn't figure out how to make it so that I could
add a method which takes a single argument.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
0a9aeb86bd
Silence the byte compiler
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
97dcb49e46
jupyter-kernel-process: Add connect-p
slot
...
This is used to distinguish between a connection made to an already
existing kernel vs one that is launched by us.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
ded0306403
jupyter-repl: Load jupyter-client
at compile time
...
There are macros that are defined in there which are used in
`jupyter-repl`.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
8255cc2f17
Implement the state monad more accurately
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
48eb141ea0
Add missing comma in backquote expression
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
b678e47666
Fix reference to free variable
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
f859568eaf
jupyter-repl-completing-read-repl-buffer: Modify return value
...
Return nil in the case that there are no REPL buffers available,
previously an error was raised. Allows for a simplification at one
call site.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
1daf4463c1
Shutdown kernel when killing REPL buffer
...
This brings back the previous behavior of shutting down a kernel when
killing its REPL buffer. Just disconnecting a client leaves around
open kernel connections, e.g. a websocket in the case of a
`jupyter-server-kernel`, that do not get cleaned up anywhere.
Shutting down the kernel when killing the REPL buffer is a stop-gap
solution until there is a more universal way of cleaning up kernel
connections when clients are no longer using them.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
8f66fe872d
jupyter-repl-kill-buffer-query-function: Update documentation
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
24c46ac7c0
Re-add call to deactivate interaction buffers when killing REPL buffer
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
5a9a068734
jupyter-repl-execute-cell: Avoid setting client execution-count
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
2381587ff8
jupyter-repl-sync-execution-state: Don't set client execution-count
...
Setting the execution-count already happens in
`jupyter-handle-message`, called in one of the subscribers of a
request's message publisher.
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
d061c6eb89
Rename jupyter-reply-message
-> jupyter-reply
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
ba79115fc4
jupyter-run-repl: Abstract out server determination code
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
6418de7ef5
Add the jupyter-use-zmq
custom variable
2023-02-13 20:30:19 -06:00
Nathaniel Nicandro
5857352135
Add the jupyter-kernelspecs
method
...
Replaces both `jupyter-available-kernelspecs` and
`jupyter-server-kernelspecs`.
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
b55b27c0ce
Fix jupyter-message-parent-type
checks
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
4c5945c668
Better question when asking to kill a REPL buffer
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
c1bff794d0
Add jupyter-reply-message
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
22d2a3f327
Remove the jupyter-send
method...
...
- Add a `message-publisher` slot to `jupyter-request`, set when
sending a request.
- `*-request` functions now return a delayed request value instead of
a request. Update call sites.
- Add the functions `jupyter-messages`, `jupyter-idle`,
`jupyter-message-subscribed` and `jupyter-client-subscribed`.
- Move client subscription to a request's messages to
`jupyter-client-subscribed`.
- Request callbacks are now added via `jupyter-message-subscribed`.
- Reduce usage of callbacks in favor of searching `jupyter-messages`
where appropriate.
- Update tests
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
039decdc97
Remove calls of jupyter-wait-until-received
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
d89e5f104d
jupyter-eval-add-callbacks -> jupyter-eval-callbacks
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
ac35f52e02
Add :callbacks and :handlers keys to request calls
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
baa01cbcac
Fix wording in a few comments
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
f0712a2a4d
Remove unused macro
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
a76d772716
(send ... (request ...)) -> (request ...)
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
b77dd297e3
Fix wrong number of arguments
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
63a1b846d6
Use jupyter-connected-p
in one place
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
1e1399b5b6
Fix interactive spec of jupyter-run-repl
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
134167e65e
Remove keyword message types
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
2f87fe3ca9
Use jupyter-default-server
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
c002c0cb0c
Simplify jupyter-eval-string
for REPL clients
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
421fc840b0
Make client arg optional in jupyter-repl-execute-cell
2023-02-13 20:25:05 -06:00
Nathaniel Nicandro
18027386d4
Update test helpers
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
9d801b72a3
Remove jupyter-connection.el
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
17a09d5ac8
Don't ask to shutdown kernel when killing REPL buffer
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
b84e1320c6
Add jupyter-connected-p
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
3b8865d222
Remove kernel manager related code
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
c03493d82e
Fix timing bug
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
17460f8b7c
Use jupyter-*-request
functions
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
9aaff6bfcd
Request kernel shutdown when killing REPL buffer
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
2d807d8670
Replace uses of jupyter-clients
...
This function is used elsewhere.
2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
996d53e0b0
Use new connection interface in some places
...
* jupyter-repl.el
(jupyter-repl-kill-buffer-query-function): Use `jupyter-kernel`,
`jupyter-clients`, `jupyter-disconnect`, and `jupyter-shutdown`.
2023-02-13 20:21:14 -06:00