Commit graph

319 commits

Author SHA1 Message Date
jackkamm
e7de8b31af Integration for R (#89) 2019-04-12 08:56:20 -05:00
Nathaniel Nicandro
49571ecd8d
jupyter-repl-display-kernel-buffer: Ensure that the manager has a kernel process 2019-04-08 12:44:49 -05:00
Daniel Gomez
96c872fb7c Set show-trailing-whitespace to nil for jupyter buffers. (#83) 2019-04-06 12:39:00 -05:00
Nathaniel Nicandro
82ec2fb786 Handle all valid arguments in client propagating advise
Fixes #76.
2019-04-01 21:45:00 -05:00
Nathaniel Nicandro
25975b9fae
Use the right type predicates 2019-03-25 13:19:02 -05:00
Nathaniel Nicandro
2f18192ae7
Remove redundant :execute-input handlers
The `execution-count` slot of a `jupyter-kernel-client` is now updated higher
up in the message handling process which makes these handlers unnecessary.
2019-03-25 13:19:02 -05:00
Nathaniel Nicandro
569ae50214
jupyter-repl-ret: Avoid syncing execution state
There is really no reason for this sync since it happens after checking if the
kernel is busy and the execution-count is now updated whenever an execute_input
message is received in the `jupyter-handle-message` of a
`jupyter-kernel-client`.
2019-03-24 00:11:22 -05:00
Nathaniel Nicandro
0e8e10babb
jupyter-repl-initialize-fontification: Protect against nil font-lock-defaults 2019-03-20 21:05:46 -05:00
Nathaniel Nicandro
c010d83696
jupyter-repl-initialize-fontification: Don't fail if functions aren't present 2019-03-17 20:31:25 -05:00
Nathaniel Nicandro
83af335166
Bump version 2019-03-14 09:29:11 -05:00
Nathaniel Nicandro
662e983612
Don't require subr-x at runtime 2019-03-14 09:16:44 -05:00
Nathaniel Nicandro
4f8e5da4ba
Ensure the REPL buffer is current when inserting banner 2019-03-10 04:39:43 -05:00
Nathaniel Nicandro
49d43b690e
jupyter-repl.el: Update commentary 2019-03-10 03:06:16 -05:00
Nathaniel Nicandro
6894a73d57
Cleanup stale comments 2019-03-07 22:51:25 -06:00
Nathaniel Nicandro
dd0feef022
jupyter-repl-mode: Prevent a major-mode change
Changing `major-mode`s would kill the local `jupyter-current-client` variable
which we don't want to happen. There is no reason (that I can think of) to
change the `major-mode' in a REPL buffer anyways.
2019-03-07 22:51:25 -06:00
Nathaniel Nicandro
581aab10b6
jupyter-kernel-language: Change return value to be a symbol
This avoids interning a string for every method dispatch using the
jupyter-lang method specializer.
2019-03-07 22:51:25 -06:00
Nathaniel Nicandro
764bf6f717
jupyter-repl-restart-kernel: Inhibit handlers except :shutdown-reply
See https://github.com/dzop/emacs-jupyter/pull/45#discussion_r262015539.
2019-03-04 17:47:02 -06:00
Nathaniel Nicandro
99f1099d68
jupyter-repl-available-repl-buffers: Use provided-mode-derived-p
So that a mode derived from `jupyter-repl-lang-mode` is still considered a
match.
2019-03-02 18:24:48 -06:00
Nathaniel Nicandro
9114397f2c
jupyter-repl-syntax-propertize-function: Move Julia specific setup to jupyter-julia.el 2019-03-02 18:14:49 -06:00
Nathaniel Nicandro
e127e1d45b
Add jupyter-repl-cell-cond 2019-03-02 18:14:49 -06:00
Nathaniel Nicandro
2c5cde166f
jupyter-repl-interaction-mode-line: Check heartbeat first 2019-03-02 18:14:49 -06:00
Nathaniel Nicandro
1f5c7743d5
Working towards a cleaner REPL restart
See #50.
2019-03-02 18:14:49 -06:00
Nathaniel Nicandro
2a3b175f26
jupyter-repl-after-change: Maintain field membership at cell beginning
This handles an edge case where `field-end` would return the position at the
beginning of a cell even though there was text that was part of the cell code
after that position. The issue had to do with the interaction between the
sticky text properties at field boundaries. See #38.
2019-02-27 14:44:23 -06:00
Nathaniel Nicandro
4e93839004
Narrow to REPL cell when calling language mode font-lock functions 2019-02-27 14:44:23 -06:00
Nathaniel Nicandro
a76e8d5151
jupyter-repl-do-after-change: Widen the buffer before doing any work
See #38.
2019-02-25 20:59:12 -06:00
Nathaniel Nicandro
75fa0eea29
Add REPL prompt string constants 2019-02-22 21:05:45 -06:00
Nathaniel Nicandro
ae5ed507fb
Handle prompt margin overflow in the REPL
Whenever a prompt string exceeds `jupyter-repl-prompt-margin-width`, increase
`jupyter-repl-prompt-margin-width` so that is can accommodate the string and
redisplay all prompts.
2019-02-22 20:57:42 -06:00
Nathaniel Nicandro
9484735c06
Fix undo in the REPL
When inserting continuation prompts, extra text deletion entries where being
added in `buffer-undo-list` which caused yanked text to not be undone fully
since it would add in those entries before undoing the yank.
2019-02-21 23:21:22 -06:00
Nathaniel Nicandro
19e18f36f8
jupyter-repl-syntax-propertize-function: Fix bounds used 2019-02-19 02:58:55 -06:00
Nathaniel Nicandro
6d59862b4d
Remove redundant with-syntax-table 2019-02-18 11:31:57 -06:00
Nathaniel Nicandro
183547403d
jupyter-repl-ret: Use cond 2019-02-18 11:31:57 -06:00
Nathaniel Nicandro
3f76534121 jupyter-repl-syntax-propertize-function: Consider string syntax in output 2019-02-17 23:07:00 -06:00
Nathaniel Nicandro
2c8ccf32d6
jupyter-repl-kill-buffer-query-function: Ask to also kill the kernel 2019-02-16 09:45:46 -06:00
Nathaniel Nicandro
d4969cbfcc CHANGELOG.org: Add function to change version numbers 2019-02-14 23:05:00 -06:00
Nathaniel Nicandro
75f9df7d0a
jupyter-repl-history-add-input -> jupyter-repl-history-add 2019-02-14 16:42:12 -06:00
Nathaniel Nicandro
913af5c314
Add jupyter-repl-cell-(pre|post)-send-hook 2019-02-14 16:42:12 -06:00
Nathaniel Nicandro
143eacc6fc
jupyter-repl-finalize-cell: Go to point-max first
The "current input cell" is intended to be the last cell in the REPL buffer so
go to `point-max` before calling `jupyter-repl-cell-beginning-position`.
2019-02-14 16:42:12 -06:00
Nathaniel Nicandro
6eec94a97f Integrate better with font-lock and syntax-ppss in the REPL buffer
* Add `jupyter-repl-syntax-propertize-function`. This allows packages like
  `rainbow-delimiters-mode` to work regardless of what is printed as output of
  a REPL cell by setting the syntax-table property on parenthesis in REPL
  output.

* Fix an issue with the Julia REPL which would cause `syntax-ppss` to
  report the wrong parenthesis depth due to the `]` character of the REPL
  package mode. Thus interfering with how `rainbow-delimiters-mode` works.

* Ensure that the kernel language's syntax table is used when fontifying and
  adding syntax properties.
2019-02-14 16:12:00 -06:00
Nathaniel Nicandro
d0ccb98ae5
jupyter-repl-update-cell-count: Only reset input prompts
There is no need to reset the prompt when it isn't displaying the cell count.
This also ensures that a kernel that shows a prompt other than the input prompt
doesn't get overwritten.
2019-02-14 00:49:16 -06:00
Nathaniel Nicandro
098d5985f4
jupyter-run-repl: Better error if kernelspec can't be found 2019-02-14 00:11:31 -06:00
Nathaniel Nicandro
524def5a01
jupyter-connect-repl: Un-pause heartbeat channel
See #29.
2019-02-13 23:42:02 -06:00
Nathaniel Nicandro
7f12b0e8e7
jupyter-read-expression: Proper use of history variable
Also add the read expression as a history element in the REPL history if the
client is a REPL client.
2019-02-13 16:50:51 -06:00
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