Commit graph

535 commits

Author SHA1 Message Date
Nathaniel Nicandro
16f5adcb9b Sync execution state if kernel was previously busy 2018-05-15 16:45:25 -05:00
Nathaniel Nicandro
936bc34c9b Remove xterm-color dependency 2018-05-15 16:45:25 -05:00
Nathaniel Nicandro
afb00e8dd2 Ensure dependencies are met before attempting to handle rich output 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
f9394b206e Fix edge case when navigating backward in history 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
7d7b7650b9 Mainly code style changes 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
670611ded1 Update code comments and documentation 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
6a68cb6180 Introduce jupyter-dispatch-message-cases 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
12c4b61d88 Send the endpoint and identity to the subprocess when starting async channels 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
fc665655f8 Remove jupyter-connection
To make up for this:
- Move the functions defined in `jupyter-connection.el` to `jupyter-base.el`
- Add a `session` field to the `jupyter-kernel-manager` and `jupyter-channel`
  classes
- Add a `kernel-info` field to the `jupyter-repl-client`
- Add a `conn-info` field to a `jupyter-session`
- Add a `session` field to `jupyter-kernel-client`
2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
cf963afa45 Set the last message time on the request after handling the message 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
e8b42a63e0 Handle edge case in jupyter-repl-backward-cell 2018-05-15 16:45:24 -05:00
Nathaniel Nicandro
5be1050ea7 Display using a different mimetype if text/plain is unavailable in jupyter-repl-eval-string 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
9ee557f6e5 Small changes to org-babel-jupyter-prepare-result 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
c3b897bae3 Refactor org-babel-jupyter-file-name 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
ff47cc6812 Refactor org-babel-jupyter-initiate-session-by-key 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
b6cfb0aac1 Attempt to convert scalar strings into tables in org-babel-jupyter--transform-result 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
ae7ef51607 Run org-babel-after-execute-hook after async execution finishes 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
8e9569ac3e Handle errors properly for file results 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
eb001c3e83 Rename id-cleared to first-async-insertion 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
59ea82f066 Properly insert the execution ID before async file results are available 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
b01e4c024b Handle injection of render parameters more intelligently 2018-05-15 16:45:23 -05:00
Nathaniel Nicandro
fa219fa9f8 Generalize insertion of image results in org-babel-jupyter-prepare-result 2018-05-15 16:45:22 -05:00
Nathaniel Nicandro
a15c59db33 Always inhibit the handlers that are being overridden 2018-05-15 16:45:22 -05:00
Nathaniel Nicandro
15503e1846 More fine tuned syntactic fontification 2018-05-15 16:45:22 -05:00
Nathaniel Nicandro
4c04436feb Really prevent insertion of text in a finalized cell 2018-05-15 16:45:18 -05:00
Nathaniel Nicandro
d9e38faf35 Markdown links for the Julia kernel are clickable 2018-05-13 12:11:14 -05:00
Nathaniel Nicandro
bcd45b6db4 Tiny refactors/optimizations 2018-05-13 12:11:08 -05:00
Nathaniel Nicandro
c65a842b45 Add org-babel-jupyter-scratch-buffer 2018-05-13 12:11:07 -05:00
Nathaniel Nicandro
6fec4e2d85 Implement jupyter-repl-scratch-buffer 2018-05-06 03:18:05 -05:00
Nathaniel Nicandro
53ebf1ad35 Ensure a unibyte representation when signing messages 2018-05-06 03:16:47 -05:00
Nathaniel Nicandro
f79c0b68ac Update ZMQ calls for an updated version of ZMQ 2018-05-06 03:15:42 -05:00
Nathaniel Nicandro
9ddec6c469 Decode date fields into time objects in jupyter--decode 2018-05-05 23:16:01 -05:00
Nathaniel Nicandro
979cac9848 Handle :results none 2018-04-19 01:43:41 -05:00
Nathaniel Nicandro
35d8dfa125 Add jupyter image for ob-jupyter tests 2018-02-12 18:04:20 -06:00
Nathaniel Nicandro
b1ec67645e Ignore temporary flycheck files 2018-02-12 18:03:21 -06:00
Nathaniel Nicandro
ef69521202 Update documentation and comments 2018-02-12 11:06:09 -06:00
Nathaniel Nicandro
32bee0bd67 Fix REPL callbacks to take into account the REPL's status handler
The status handler should only run for execute requests and should be
 inhibited for other kinds of requests.
2018-02-12 10:58:36 -06:00
Nathaniel Nicandro
c4a1d6aa97 Remove old variable 2018-02-12 10:57:45 -06:00
Nathaniel Nicandro
09534ab6fb Don't error out in a predicate, just return nil 2018-02-12 10:57:19 -06:00
Nathaniel Nicandro
26544b95ca Refactor jupyter-repl-ret to (hopefully) be more obvious in what its doing 2018-02-12 10:55:22 -06:00
Nathaniel Nicandro
656a2d913b Add org-babel-jupyter tests 2018-02-12 10:49:41 -06:00
Nathaniel Nicandro
d879e743a4 Refactor tests 2018-02-12 10:49:28 -06:00
Nathaniel Nicandro
56a36b8fa0 Remove the need to queue messages in a complicated way
Messages were queued by the messages sent timestamp in the message header as
well as based on the channel the message was received on because there is no
guarantee on the order of the received messages. This matters because a request
is dropped from a client's request table when an idle message is received, but
this idle message is not guaranteed to be the last message received for a
request, for example a reply message may come after the idle message has been
received.

Now if a request has received an idle message already, instead of
dropping it immediately, drop it only when the last received message time for
the request is longer than a few seconds.
2018-02-12 10:47:26 -06:00
Nathaniel Nicandro
ad0aefe307 Handle error messages through the IOPub error handler or callbacks
Handler methods are only run on a successful request. If an error occurs during
execution an error message is emitted on the IOPub channel, this is where
errors are handled. Or they can be captured in the reply messages through
callbacks.
2018-02-12 10:25:36 -06:00
Nathaniel Nicandro
24eb475443 Cleanup comments 2018-02-12 10:25:13 -06:00
Nathaniel Nicandro
98c646bfb5 Block until a channel is stopped in jupyter-stop-channel for async channels 2018-02-12 10:22:13 -06:00
Nathaniel Nicandro
c4170acb77 Remove jupyter-repl-restart-channels
The channel process should not have to be restarted. This was needed because
signals weren't being handled properly in the subprocess.
2018-02-09 17:25:15 -06:00
Nathaniel Nicandro
86be51eb72 Don't rely on the event string in a process sentinel 2018-02-09 17:23:46 -06:00
Nathaniel Nicandro
b0186f3201 Take into account messages with no associated requests
For example, IOPub messages from other clients
2018-02-09 17:22:45 -06:00
Nathaniel Nicandro
9650fecf82 Remove uses of jupyter-request-run-handlers-p 2018-02-09 17:22:27 -06:00