Commit graph

277 commits

Author SHA1 Message Date
Nathaniel Nicandro
dc27d1ebe5
jupyter-repl-restart-kernel: Prompt for a REPL client if necessary
In the case that `jupyter-current-client` is not a valid REPL client, prompt
for a REPL buffer to restart. See #28.
2019-02-12 20:30:20 -06:00
Nathaniel Nicandro
5f7af55a9c
Update REPL kernel restart process 2019-02-12 15:35:19 -06:00
Nathaniel Nicandro
63717b9e39
Bump version 2019-02-12 09:17:06 -06:00
Nathaniel Nicandro
034f309222
Add jupyter-display-current-buffer-reuse-window
Closes #27.
2019-02-11 16:01:41 -06:00
Nathaniel Nicandro
2b179256eb
jupyter-repl-propagate-client: Fix documentation 2019-02-11 14:36:57 -06:00
Nathaniel Nicandro
3af61ab8cb
jupyter-repl-available-repl-buffers: Use object-of-class-p
See #26.
2019-02-10 11:29:33 -06:00
Nathaniel Nicandro
159e6ffdb1 Remove stale comment 2019-02-09 14:34:00 -06:00
Nathaniel Nicandro
260ba128eb jupyter-repl-ret: Don't send messages when the kernel is busy 2019-02-09 09:17:00 -06:00
Nathaniel Nicandro
ce6c92a2c4
jupyter-repl-interaction-mode: Remove missing functions from hooks
`jupyter-eldoc-documentation` and `jupyter--xref-backend` are WIPs that somehow
got into master.
2019-02-07 20:01:30 -06:00
Nathaniel Nicandro
0a34860707
Fix package-lint errors 2019-02-07 11:17:24 -06:00
Nathaniel Nicandro
771e267034
Fix checkdoc errors 2019-02-06 22:49:41 -06:00
Nathaniel Nicandro
ee62fafdf6
Fix #14: Undo rear-nonsticky property inserted by insert-for-yank 2019-01-25 23:59:51 -06:00
Nathaniel Nicandro
d7fb71df02
jupyter-repl-indent-line: Only attempt to indent on code cell lines 2019-01-24 10:13:20 -06:00
Nathaniel Nicandro
9ef7553b8a
Handle field property specially when yanking in the REPL 2019-01-23 19:45:41 -06:00
Nathaniel Nicandro
649c54c15f
Silence byte compiler 2019-01-23 19:41:20 -06:00
Nathaniel Nicandro
463245e4f9
jupyter-repl-initialize-fontification: Fix setting of fontify region function 2019-01-22 18:39:17 -06:00
Nathaniel Nicandro
4e2e8642ed
Update a few comments 2019-01-22 18:39:17 -06:00
Nathaniel Nicandro
d709b31a64
Add jupyter-message-lambda
This simplifies the writing of message callbacks.
2019-01-22 18:39:17 -06:00
Nathaniel Nicandro
e439d3a531
jupyter-read-expression (jupyter-repl-client): Remove sentinel value 2019-01-19 15:28:03 -06:00
Nathaniel Nicandro
39fba18b06
Update kernel restart process 2019-01-18 22:02:13 -06:00
Nathaniel Nicandro
e2381e600c
jupyter-repl-propagate-client: Simplify logic 2019-01-18 22:00:58 -06:00
Nathaniel Nicandro
123d847a3e
jupyter-repl-interaction-map -> jupyter-repl-interaction-mode-map 2019-01-17 20:45:45 -06:00
Nathaniel Nicandro
876c080f7f
Add jupyter-kernel-language-mode-properties and related functions 2019-01-17 19:53:04 -06:00
Nathaniel Nicandro
fa809e7801
Fix keybinding in documentation 2019-01-17 19:01:01 -06:00
Nathaniel Nicandro
6b7ecfcf08
Add execution-count slot to a jupyter-kernel-client
This allows the default `jupyter-kernel-client' implementation to do the work
of updating the execution count instead of having subclasses track it.
2019-01-13 22:19:25 -06:00
Nathaniel Nicandro
0c92afea26
Add the jupyter-handle-payload method
This replaces the `jupyter-repl--handle-payload` function and allows payloads
to be handled in other contexts than the REPL, for example inserting a new
source block when receiving a set_next_input payload for the `org-mode` client.
2019-01-13 22:19:25 -06:00
Nathaniel Nicandro
5a3b3bde3a
Use font-lock-fontify-region-function in a REPL buffer
Uses the new function `jupyter-repl-font-lock-fontify-region` to fontify a REPL
buffer. This function will only fontify regions corresponding to input cells
and excludes all other regions from fontification. Regions besides input cells
correspond mainly to output from the kernel and use font-lock-face to fontify
their contents.

This allows us to remove the functions and variables related to adding syntax
properties to the output of a cell since these were previously used to avoid
syntactic fontification of the output.
2018-12-28 12:59:03 -06:00
Nathaniel Nicandro
675bfb0a38
jupyter-repl-initialize-fontification: Use regexp-quote 2018-12-20 19:26:25 -06:00
Nathaniel Nicandro
109ee2cce5
jupyter-repl-initialize-fontification: Fix syntax propertize function
Adds `jupyter-repl--syntax-propertize` which generalizes the old
`syntax-propertize-function` to handle regions containing both cell code and
cell output.
2018-12-20 18:58:23 -06:00
Nathaniel Nicandro
169b5647e5
jupyter-rep-sync-execution-state: Only update the last cell count 2018-12-19 21:05:12 -06:00
Nathaniel Nicandro
df1d135433
jupyter-with-repl-cell: Don't move point after narrowing
Leave this up to the callers of this macro.
2018-12-16 14:56:14 -06:00
Nathaniel Nicandro
bcfdf170b5
jupyter-repl-update-cell-count: Don't assume the buffer has a cell
This avoids a beginning-of-buffer error during initialization of the REPL.
2018-12-16 14:52:36 -06:00
Nathaniel Nicandro
5db8ded2f0
jupyter-repl-cell-code-end-position: Fix what is considered the end position
In Emacs, the end position of a region is exclusive. So functions like
`delete-region` will delete the entire region specified excluding the end
position. Follow this convention with the cell code position.

This fixes issues when adding syntax properties to a cell's code. See
`jupyter-repl-initialize-fontification`.
2018-12-12 11:54:58 -06:00
Nathaniel Nicandro
460b94f17f
Add jupyter-repl-update-cell-count 2018-12-10 21:36:35 -06:00
Nathaniel Nicandro
3cd9078c0c
Ensure with-current-buffer is called on a live buffer 2018-12-10 21:36:35 -06:00
Nathaniel Nicandro
706a0ba6bc
Add jupyter-repl-traceback face 2018-12-10 21:36:35 -06:00
Nathaniel Nicandro
747e82fc22
Be clearer in REPL history functions 2018-12-10 21:36:35 -06:00
Nathaniel Nicandro
7f5c8d8a4b
Be more robust when determining if a call to a command was interactive
As per the `called-interactively-p` documentation.
2018-12-10 21:36:35 -06:00
Nathaniel Nicandro
b1a5e9a914
jupyter-repl-sync-execution-state: Remove stale code
The `execution-state` slot is now a `jupyter-kernel-client` slot and is updated
by that class.
2018-12-10 21:36:35 -06:00
Nathaniel Nicandro
e25cec237f
Remove unneeded function declaration
jupyter-base.el already requires subr-x
2018-12-10 18:31:39 -06:00
Nathaniel Nicandro
c5a03da4e0 jupyter-repl-finalize-cell: Fix setting of buffer-undo-list
Don't set `buffer-undo-list` to a boundary entry, set it to an entry which
indicates on undo information.
2018-11-26 12:37:37 -06:00
Nathaniel Nicandro
a7148927fe Add jupyter-repl-propertize-regex
Previously, when propertizing the output of the REPL, a regular expression was
generated every time to take into account the comment characters of the kernel
language. Adding this variable ensure that we only create the expression once.
2018-11-26 12:37:37 -06:00
Nathaniel Nicandro
4ad72e4781 Rename jupyter-output-buffer-* to jupyter-display-buffer-*
An output buffer implies output from the kernel, but they are used for more
general purposes other than displaying output form the kernel.
2018-11-26 12:37:37 -06:00
Nathaniel Nicandro
99c0bf0f55 Remove unused code 2018-11-21 12:35:34 -06:00
Nathaniel Nicandro
fca89359fd Rename jupyter-repl-display-traceback to jupyter-display-traceback
Also move the function to jupyter-client.el from jupyter-repl.el

* jupyter-repl.el (jupyter-repl-display-traceback): Do it.

* jupyter-client.el (jupyter-display-traceback): Do it.
2018-11-21 12:35:34 -06:00
Nathaniel Nicandro
6a1da44904 Move evaluation functions from jupyter-repl.el to jupyter-client.el
These functions are general and not only useful for REPLs.
2018-11-19 08:50:32 -06:00
Nathaniel Nicandro
c859d34faf Add jupyter-repl-cell-output
* jupyter-repl.el (jupyter-repl-cell-output): Do it.
2018-11-17 15:24:11 -06:00
Nathaniel Nicandro
6aed12011a jupyter-repl-append-output: Mark output as read only
This used to be done by `jupyter-repl-insert`, but this is no longer the case
as all insertion of results is handled by the functions in jupyter-mime.el
while `jupyter-repl-insert` is more specific to insertion in the REPL buffer.
2018-11-17 11:47:55 -06: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
081f329da1 v0.6.0 2018-11-16 00:27:47 -06:00