Commit graph

1307 commits

Author SHA1 Message Date
Nathaniel Nicandro
890453b716 Re-work last commit 2018-11-16 14:23:16 -06:00
Nathaniel Nicandro
b67262f0f5 Take into account Travis' python version for tests 2018-11-16 13:37:14 -06:00
Nathaniel Nicandro
e04a81a3ad jupyter-fontify-buffer: Don't store fontify buffers 2018-11-16 17:29:47 +00:00
Nathaniel Nicandro
b39f9020c5 jupyter-fontify-according-to-mode: Don't show the fontify buffer 2018-11-16 17:24:18 +00:00
Nathaniel Nicandro
78a0747ddb Call after change function only when change is due to cell code
* jupyter-repl.el (jupyter-repl-do-after-change): Do it.
(jupyter-repl-after-change): Remove check that is now done at a higher level.
2018-11-16 17:22:10 +00:00
Nathaniel Nicandro
5ef71de62b Use universal time when testing encoding/decoding of time values 2018-11-16 12:08:02 +00:00
Nathaniel Nicandro
f0849c855a Install a kernelspec using the right python in Travis tests 2018-11-16 05:26:37 -06:00
Nathaniel Nicandro
5e09b4d78f Show Jupyter paths in Travis test output 2018-11-16 05:10:19 -06:00
Nathaniel Nicandro
fbeb0dba0b jupyter-start-kernel: Handle all return values of file-attributes 2018-11-16 05:09:52 -06:00
Nathaniel Nicandro
50ac28910a Remove usage of deprecated when-let
This was deprecated in Emacs 26.1
2018-11-16 04:59:09 -06:00
Nathaniel Nicandro
ca44a3922d Use universal time when encoding time values
* jupyter-messages.el (jupyter--encode-time): Do it.

* test/jupyter-test.el (jupyter-messages): Update test.
2018-11-16 04:49:43 -06:00
Nathaniel Nicandro
bfe549a0f5 Ensure Jupyter directories exist during testing 2018-11-16 04:27:57 -06:00
Nathaniel Nicandro
3258dc752e Export build variables for zmq in Travis tests 2018-11-16 04:03:01 -06:00
Nathaniel Nicandro
e4546e53ae Fix Travis, attempt 6
Travis really doesn't like strings.
2018-11-16 03:44:05 -06:00
Nathaniel Nicandro
178f5d1212 Fix Travis, attempt 5 2018-11-16 02:58:36 -06:00
Nathaniel Nicandro
3515b30b9a Fix Travis, attempt 4
Travis seems to consider the # character in a funny way.
2018-11-16 02:39:50 -06:00
Nathaniel Nicandro
b889a29d36 Fix Travis, attempt 3 2018-11-16 02:18:11 -06:00
Nathaniel Nicandro
3901b4ecca Another attempt at fixing Travis config 2018-11-16 01:23:09 -06:00
Nathaniel Nicandro
6de19f55c3 Fix Travis config 2018-11-16 00:51:20 -06:00
Nathaniel Nicandro
91254d6d9a Add Travis CI configuration 2018-11-16 00:30:15 -06:00
Nathaniel Nicandro
081f329da1 v0.6.0 2018-11-16 00:27:47 -06:00
Nathaniel Nicandro
42cc3d3853 Do not use the make- prefix for struct constructors 2018-11-16 00:27:47 -06:00
Nathaniel Nicandro
3b0a96de7d Update README 2018-11-16 00:27:47 -06:00
Nathaniel Nicandro
740ed190cc Document jupyter-ioloop 2018-11-16 00:27:47 -06:00
Nathaniel Nicandro
84ac019e77 Update javascript packages 2018-11-16 00:27:47 -06:00
Nathaniel Nicandro
47baf33a16 Add Makefile 2018-11-16 00:27:47 -06:00
Nathaniel Nicandro
ea56331f85 Privatize some functions
* jupyter-org-client.el (jupyter-org-add-result, jupyter-org-insert-results):
Add double hyphen for `jupyter-org` namespace.
2018-11-16 00:15:51 -06:00
Nathaniel Nicandro
9097464cc8 Add jupyter-delete-all-kernels
Add this to `kill-emacs-hook` to ensure that connection files are cleaned up in
a more reliable fashion. The connection files are cleaned up when the kernel
process is garbage collected, but this won't happen when killing Emacs.

* jupyter-kernel-manager.el (jupyter-delete-all-kernels): Do it.
Add to `kill-emacs-hook`.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
df36a486aa More reliably catch the startup message from python kernels
* jupyter-channel-ioloop (jupyter-channel-ioloop-add-start-channel-event): Do it.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
a9add47b6f jupyter-repl-kill-buffer-query-function: Stop the client's channels
Although the client's channels are cleaned up when it goes out of scope, there
may be some stray messages that come through before that occurs. If they
do, they will attempt to access a killed buffer. Prevent that.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
05bcbba42f Remove special handling of python kernel
In Jupyter > 4.3.0, the Python kernel only sends an execute-result.

* jupyter-org-client.el (jupyter-org-result): Do it.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
823ea8adde Fix checkdoc warnings 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
3c05232a90 Add Cask file 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
5a7c083169 More reliably capture the startup message
It still sometimes isn't caught but it is more reliable. This mainly affects
testing.

* jupyter-client.el (jupyter-start-channels): Add a small delay after starting
  channels.

* jupyter-kernel-manager.el (jupyter-start-kernel): Remove superfluous delay.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
75abea913d Update tests 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
b45321b181 Add jupyter--run-handler-p
Split from `jupyter--run-handler-maybe`. Makes for easier testing of the
handler logic.

* jupyter-client.el (jupyter--run-handler-maybe): Use it.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
fbdcac6c37 Silence byte compiler 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
a4e7fbf7ba Use defsubst for some message functions
* jupyter-messages.el (jupyter-message-id, jupyter-message-parent-id):
(jupyter-message-type, jupyter-message-session, jupyter-message-parent-type):
(jupyter-message-get, jupyter-message-data, jupyter-message-status-idle-p): Do it.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
5e9a4d2e7a jupyter-ioloop-handler: Escape format characters when debugging messages 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
0052d9b30f jupyter-insert: Only fontify the docstring region for Python inspect requests
* jupyter-python.el (jupyter-insert): Do it.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
45a62b6b81 jupyter-inspect: Insert the message property list 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
b44c8871d4 Cleanup a clients ioloop process through finalizers
* jupyter-client.el (initialize-instance): Stop channels in finalizer.

* jupyter-ioloop.el (jupyter-ioloop--make-filter): New function.
(jupyter-ioloop-start): Make a weak reference OBJECT.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
1fa522a4cd Simplify heartbeat channel logic 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
53b00de7c8 Remove subprocess lock tests
This did not prove useful since after carefully reading the documentation and
with my own tests, the lock files remained most of the time after Emacs
crashes.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
75bba80404 Remove old uses of jupyter-finalize
This was an old method before `make-finalizer` started to be used internally.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
7be19f7528 Update tests to take into account changes in jupyter-ioloop 2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
66c2ee40cb jupyter-insert: Allow for passing in message property lists
* jupyter-mime.el (jupyter-insert): Do it.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
3372bb9211 Simplify ioloop process handling
* jupyter-ioloop.el (jupyter-ioloop): Inherit from jupyter-finalized-object.
Remove object slot.
(initialize-instance): New method addition.
(jupyter-ioloop--filter, jupyter-ioloop--sentinel): Remove.
(jupyter-ioloop-start): Pass closure as a filter function to the process.
(jupyter-ioloop-stop): No need to nil out process slot.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
2ef5f0acb3 Add jupyter-ioloop-alive-p
* jupyter-ioloop.el (jupyter-ioloop-alive-p): Do it.
(jupyter-ioloop-handler): Remember if a process was started or if it has
stopped already.
2018-11-15 23:04:27 -06:00
Nathaniel Nicandro
965b405312 Small refactoring
* jupyter-ioloop.el (jupyter-ioloop-printer): Add documentation, move it.
(jupyter-ioloop-start): Give a default implementation.
2018-11-15 23:04:27 -06:00