Commit graph

1325 commits

Author SHA1 Message Date
Nathaniel Nicandro
b01764d06a jupyter-org-with-src-block-client: Avoid with-current-buffer
`jupyter-org-with-src-block-client` is used in the `completion-at-point`
interface and `with-current-buffer` is slow so there should be a slight speed
up here.
2019-02-14 23:04:00 -06:00
Nathaniel Nicandro
46fd8bec20
Generalize org-babel-jupyter-setup-export 2019-02-14 16:54:33 -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
32d886cf7e jupyter-eval-string: Better validation of jupyter-current-client 2019-02-14 16:11: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
9aa58ebce2
Update obsolete documentation on client channels 2019-02-13 09:25:17 -06:00
Nathaniel Nicandro
5af47e3407
Fix #10: Only verify cask is installed for targets that require it 2019-02-12 20:30:20 -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
4d37b0efea
jupyter-shutdown-kernel: Forcibly kill the kernel after timeout 2019-02-12 15:35:19 -06:00
Nathaniel Nicandro
5f7af55a9c
Update REPL kernel restart process 2019-02-12 15:35:19 -06:00
Nathaniel Nicandro
e8715a9e57
jupyter-hb-pause: Empty the socket's message queue
This is needed to avoid an invalid state of the socket when un-pausing the
channel and attempting to send a message when there is a message waiting to be
received.
2019-02-12 14:53:56 -06:00
Nathaniel Nicandro
7de5231ab9
Add CHANGELOG.org 2019-02-12 12:24:16 -06:00
Nathaniel Nicandro
3f5aa0039e
Add org-babel-jupyter-setup-export
This function is used to ensure that export variables are setup to handle
Jupyter src-blocks.
2019-02-12 11:49:17 -06:00
Nathaniel Nicandro
63717b9e39
Bump version 2019-02-12 09:17:06 -06:00
Nathaniel Nicandro
4978c28add
Revert jupy- prefix to jupyter- for org-mode src-blocks
Closes #5.
2019-02-12 09:17:06 -06:00
Nathaniel Nicandro
5d293bb2d3
Let bind display-buffer-base-action before calling display-buffer
This is to give packages like window-purpose a chance to work since passing in
the action alist directly seems to override the behavior of such packages.
See #27.
2019-02-12 08:35:03 -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
e95f3bf3eb
Reword some parts of the README 2019-02-10 02:41:42 -06:00
Nathaniel Nicandro
7ddbcc1efc
Cleanup documentation 2019-02-10 02:25:05 -06:00
Nathaniel Nicandro
b848c24f4c
jupyter-org--append-result: Preserve point when handling latex 2019-02-09 15:23:02 -06:00
Nathaniel Nicandro
a99863de90 jupyter-completing-read-kernelspec: Fail if no kernelspecs available
Also fail if none of the available kernelspecs were selected.
2019-02-09 14:36:00 -06:00
Nathaniel Nicandro
f716de5a67 Update README
Close #15.
2019-02-09 14:35:00 -06:00
Nathaniel Nicandro
159e6ffdb1 Remove stale comment 2019-02-09 14:34:00 -06:00
Nathaniel Nicandro
3d6dece151 Fix jupyter-inspect in org-mode 2019-02-09 14:33:00 -06:00
Nathaniel Nicandro
611b069f91 Don't slow down src-block result insertion if no latex results
Check for a latex fragment org-element instead of skipping over words. The
previous behavior would cause a large slow down if the results contained a
large amount of text.
2019-02-09 14:32:00 -06:00
Nathaniel Nicandro
647f32e405 jupyter-start-kernel: Ensure runtime directory exists
`make-temp-file` tries to read the `temporary-file-directory` and fails if it
does not exist yet so ensure that it does exist. Fixes #3.
2019-02-09 09:19:00 -06:00
Nathaniel Nicandro
44652c2d7a jupyter-org-image-link: Simplify construction of attribute string 2019-02-09 09:18: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
f85993e2ba jupyter-org-request-silent -> jupyter-org-request-silent-p 2019-02-09 09:16:00 -06:00
Nathaniel Nicandro
10d189f373 Fix #12: Pop up traceback when :results silent 2019-02-09 09:15:00 -06:00
Sebastian Pech
81f9f60705 Add variables to customize how short evaluation results are displayed (#21)
* Add `jupyter-eval-short-result-display-function`

* Add `jupyter-eval-short-result-max-lines`
2019-02-08 19:28:54 -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
24a79e29f2
Fix checkdoc error 2019-02-07 13:44:14 -06:00
Nathaniel Nicandro
5f264ab03a
jupyter-eval-string: Remove redundancy 2019-02-07 13:34:36 -06:00
Nathaniel Nicandro
2d31af6aa7
Update README 2019-02-07 13:34:36 -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
UndeadKernel
321e8fe81f fix: use Bash shell and omit rm errors (#13)
Without this change, if the user does not have bash, `command` fails (as
it is a bash built-in). Explicitly set bash to be the shell.

Omit error messages of the `rm` command while cleaning.
2019-02-06 14:26:52 -06:00
Nathaniel Nicandro
9bb0415255
Handle :file parameter in a cleaner way
Temporarily remove the :file parameter from the src-block parameters so that
`org-babel` does insert it as the result of the src-block.
2019-01-26 18:44:23 -06:00
Nathaniel Nicandro
70f0429e07
jupyter-org--append-result: Handle appending to a table result 2019-01-26 18:42:15 -06:00
Nathaniel Nicandro
ee1078d0c7
org-babel-jupyter-cleanup-file-links: Handle links with no directory 2019-01-26 16:17:15 -06:00
Nathaniel Nicandro
ee62fafdf6
Fix #14: Undo rear-nonsticky property inserted by insert-for-yank 2019-01-25 23:59:51 -06:00