Commit graph

1958 commits

Author SHA1 Message Date
Nathaniel Nicandro
60e35a7a14 Update jupyter-repl-mode-map 2018-01-13 23:03:22 -06:00
Nathaniel Nicandro
7288fe47c1 Add more cell motion functions 2018-01-13 23:02:12 -06:00
Nathaniel Nicandro
3432ca2283 Ensure that markdown-mode is available when needed 2018-01-13 23:00:45 -06:00
Nathaniel Nicandro
4ee9ff2ee4 Smarter filling of text in jupyter-repl-fontify-according-to-mode 2018-01-13 23:00:08 -06:00
Nathaniel Nicandro
c58cf8767e jupyter-repl-prompt-margin-width added as a custom variable 2018-01-13 22:59:14 -06:00
Nathaniel Nicandro
b58bf970e4 Update code completion using company 2018-01-13 22:57:50 -06:00
Nathaniel Nicandro
7eb055de8c Update requires 2018-01-13 22:53:19 -06:00
Nathaniel Nicandro
3897eff3ba Update comment section headers 2018-01-13 22:51:27 -06:00
Nathaniel Nicandro
fd89b419a7 Better predicate in jupyter-kernel-alive-p 2018-01-13 22:11:09 -06:00
Nathaniel Nicandro
060340625e Properly cleanup if jupyter-start-kernel fails in jupyter-start-new-kernel 2018-01-13 22:10:38 -06:00
Nathaniel Nicandro
3e57114a18 Code style and remove completed TODO 2018-01-13 22:10:18 -06:00
Nathaniel Nicandro
dc4c9f7a66 Allow restarting the kernel after shutdown in jupyter-shutdown-kernel 2018-01-13 22:08:14 -06:00
Nathaniel Nicandro
80dd6a51e8 Fix jupyter--kernel-sentinel
- `jupyter-stop-channels` is already called in `jupyter-shutdown-kernel`
- Don't delete connection info when kernel dies because it can be restarted.
2018-01-13 22:06:41 -06:00
Nathaniel Nicandro
865db23f28 Set the process sentinel in jupyter--start-kernel 2018-01-13 22:04:06 -06:00
Nathaniel Nicandro
0ad92ce933 Fix use of jupyter-include-other-output 2018-01-13 14:05:03 -06:00
Nathaniel Nicandro
710d4125b5 Update documentation and comments 2018-01-13 13:40:32 -06:00
Nathaniel Nicandro
d67883d9f5 Use unwind-protect instead of condition-case 2018-01-13 13:36:15 -06:00
Nathaniel Nicandro
2d83b757a6 Fix problems with with-jupyter-client-buffer
- Supply `with-current-buffer` with an actual buffer
- Actually expand the `client` argument
2018-01-13 13:34:02 -06:00
Nathaniel Nicandro
00d50633c7 Remove rear-nonsticky property at cell beginning when finalizing a cell
This property is set when inserting new input prompts. It should be removed
when finalizing a cell otherwise it would be possible to insert more text at
the very beginning of a cell when it is finalized.
2018-01-13 02:42:29 -06:00
Nathaniel Nicandro
56a31cbbea Handle edge cases in history navigation jupyter-repl-history-next and jupyter-repl-history-previous
For example do the right thing at history boundaries.
2018-01-13 02:17:26 -06:00
Nathaniel Nicandro
6c4c6d08f0 Implement more payloads 2018-01-12 18:47:05 -06:00
Nathaniel Nicandro
f71c6d1ad1 Preserve window margins upon window configuration changes 2018-01-12 18:45:08 -06:00
Nathaniel Nicandro
c507358119 Rename jupyter-repl-goto-request to jupyter-repl-goto-cell 2018-01-12 18:43:02 -06:00
Nathaniel Nicandro
4e6b7fcf58 Also call fill-region when fontifying a buffer
Only call `fill-region` if `fill-forward-paragraph` is not the default value.
2018-01-12 18:40:09 -06:00
Nathaniel Nicandro
c00357d43a Add jupyter-repl-insert-markdown 2018-01-12 18:39:45 -06:00
Nathaniel Nicandro
a517712e78 Fix insertion of html output 2018-01-12 18:39:27 -06:00
Nathaniel Nicandro
ae0943daa0 Introduce jupyter-repl-add-font-lock-properties
This function adds the necessary text properties to text inserted in a REPL
buffer.
2018-01-12 18:34:10 -06:00
Nathaniel Nicandro
dc7f13306c Cache fontification buffers 2018-01-12 18:28:23 -06:00
Nathaniel Nicandro
a5d188e32f Move jupyter-wait-until-startup to jupyter-kernel-manager.el
Also make `jupyter-wait-until-startup` private by renaming to
`jupyter--wait-until-startup`. Startup messages are only sent once at kernel
startup, since the only way to start a kernel is through a
`jupyter-kernel-manager` it makes more sense to only allow a kernel manager to
wait for a startup message.
2018-01-12 18:14:04 -06:00
Nathaniel Nicandro
1760d4942b Remove unused variable 2018-01-12 18:10:11 -06:00
Nathaniel Nicandro
ce9321be09 Add timeout when starting a kernel 2018-01-12 18:09:30 -06:00
Nathaniel Nicandro
7d516f2126 No need for apply-partially 2018-01-12 18:07:39 -06:00
Nathaniel Nicandro
6b5742e4cf Introduce message hook variables for received messages
The `jupyter-<channel>-message-hook` variables (where <channel> is one of
`shell`, `stdin`, or `iopub`) are run as the first step when calling the
`jupyter-handle-message` methods for a channel. The hooks take a single
argument, the message which was received on the channel.

Adding a function to `jupyter-iopub-message-hook` in combination with setting
`jupyter-include-other-output` to t eliminate the need for
`jupyter-missing-request` which was a way to add callbacks for messages which
did not have a parent header. Namely the status: starting message.
2018-01-12 18:07:02 -06:00
Nathaniel Nicandro
eae62a50af Remove cl requirement
It was previously only used for `lexical-let`, but the file now sets
`lexical-binding` to t.
2018-01-12 17:51:31 -06:00
Nathaniel Nicandro
1a81182112 Add missing group definition 2018-01-12 17:51:16 -06:00
Nathaniel Nicandro
5f8717981b Add jupyter-include-other-output 2018-01-12 17:50:24 -06:00
Nathaniel Nicandro
10f8115b8e Add with-jupyter-client-buffer, jupyter-set, jupyter-get
Use a client's IOLoop subprocess buffer as a way to store variables local to a
client
2018-01-12 17:49:22 -06:00
Nathaniel Nicandro
8ac8d2de15 Update doc strings 2018-01-12 17:43:55 -06:00
Nathaniel Nicandro
15583eab19 Refactor of jupyter--ioloop-pop-request 2018-01-12 17:42:53 -06:00
Nathaniel Nicandro
12b11e421b Cleanup comments in jupyter-kernel-client shell handler method 2018-01-12 17:41:53 -06:00
Nathaniel Nicandro
3385498cab Handle the case when a kernel does not respond to an is_complete_request 2018-01-11 12:26:31 -06:00
Nathaniel Nicandro
af82c55b1c Introduce jupyter-wait-until-startup 2018-01-11 12:14:35 -06:00
Nathaniel Nicandro
c86ab40514 Fix no method found error in jupyter-shutdown-kernel 2018-01-11 12:13:33 -06:00
Nathaniel Nicandro
53f7f3be36 Use setq-local instead of defvar-local 2018-01-11 12:12:52 -06:00
Nathaniel Nicandro
8f774120c9 Better handling of when to remove requests from a client's request table
For each message received in response to a request, record the
`last-message-time` of any received messages for a request. When a request's
`idle-received-p` field is non-nil and the `last-message-time` is larger than
some number of seconds, remove the request from the request table.
2018-01-11 12:06:26 -06:00
Nathaniel Nicandro
62691611e4 Add jupyter--ioloop-collect-messages to simplify jupyter--ioloop even more 2018-01-11 12:04:42 -06:00
Nathaniel Nicandro
b9f83a60d6 Allow passing an id to the jupyter-session constructor 2018-01-11 12:03:32 -06:00
Nathaniel Nicandro
85b3dc3167 Refactor REPL buffer initialization 2018-01-11 03:28:04 -06:00
Nathaniel Nicandro
46b70e85d0 Refactor jupyter-initialize-connection
- Use `ignore-errors` around `jupyter-connection` slots since they can be
  inherited by the `parent-instance`. Note that checking if the slot is
  available does not also check if the slots availability in the
  `parent-instance`

- Set `addr` where it is used, namely in `cl-loop`
2018-01-11 00:26:03 -06:00
Nathaniel Nicandro
34b0d45078 Use quoted lists 2018-01-11 00:25:08 -06:00