Commit graph

225 commits

Author SHA1 Message Date
Nathaniel Nicandro
82dfe3e340 Re-organization 2019-02-22 08:33:00 -06:00
Nathaniel Nicandro
960372d344 Add documentation about :display in jupyter-org-result 2019-02-22 08:31:00 -06:00
Nathaniel Nicandro
f7df9cb9cf Allow table results to be suppressed by ":results scalar" 2019-02-22 08:29:00 -06:00
UndeadKernel
92d1d661c9 feature: Specify mime precedence using ":display" in org source blocks (#17)
A BEGIN_SRC block can specify which mime type to display by enabling the
user to manually set the priority order of mime types.

e.g.: In the following, :text/plain will be used before considering :text/html
#+BEGIN_SRC jupyter-python :display plain html
2019-02-22 07:56:22 -06:00
Nathaniel Nicandro
e357166371
Add jupyter-org-insert-element 2019-02-21 17:14:59 -06:00
Nathaniel Nicandro
70f4b1b9a3
jupyter-org--append-stream-result: Consider org-edit-src-content-indentation 2019-02-21 17:14:59 -06:00
Nathaniel Nicandro
7d72673604
Account for changes in org-mode 9.2
See #36. There were some assumptions being made on how `org-mode` interpreted
`fixed-width` elements which were changes in `org-mode` 9.2.
2019-02-21 17:14:59 -06:00
Nathaniel Nicandro
b1af59cbf3
jupyter-org--stream-context-p: Consider an empty drawer 2019-02-21 08:14:09 -06:00
Nathaniel Nicandro
de289fc90b
jupyter-org--add-result: Better doc string 2019-02-20 18:42:09 -06:00
Nathaniel Nicandro
ea5ae74c1d
Don't rely on temporarily clearing :file header argument
Attempt at #16.
2019-02-20 13:34:10 -06:00
Nathaniel Nicandro
39fdac90dd
jupyter-org-client.el: Remove unused function declarations 2019-02-19 09:38:30 -06:00
Nathaniel Nicandro
10b1766035
jupyter-org-sync-results: Use when-let* 2019-02-19 09:33:58 -06:00
Nathaniel Nicandro
4c7d7b390b jupyter-org-client.el: More refactoring 2019-02-17 23:05:00 -06:00
Nathaniel Nicandro
afaf45fdea
jupyter-org-client.el: Refactor 2019-02-16 11:27:44 -06:00
Nathaniel Nicandro
d4969cbfcc CHANGELOG.org: Add function to change version numbers 2019-02-14 23:05:00 -06:00
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
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
b848c24f4c
jupyter-org--append-result: Preserve point when handling latex 2019-02-09 15:23:02 -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
44652c2d7a jupyter-org-image-link: Simplify construction of attribute string 2019-02-09 09:18: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
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
70f0429e07
jupyter-org--append-result: Handle appending to a table result 2019-01-26 18:42:15 -06:00
Nathaniel Nicandro
9abdc3644d
Document functions related to jupyter-org-define-key 2019-01-22 18:39:17 -06:00
Nathaniel Nicandro
ab7399f9c0
jupyter-org--set-current-src-block: Consider :post-affiliated keyword 2019-01-19 15:27:11 -06:00
Nathaniel Nicandro
c138d35b83
Remove stale comments 2019-01-17 20:45:45 -06:00
Nathaniel Nicandro
814300e883
jupyter-org-with-src-block-client: Mention that a client is created 2019-01-17 19:00:43 -06:00
Nathaniel Nicandro
9b955398cd
Fix 09ebdac jupyter-org-result (text/plain): Be stricter with usage of `org-babel-script-escape
I guess I should actually run the tests before uploading to github...
2019-01-16 18:50:02 -06:00
Nathaniel Nicandro
03c75caf32
jupyter-drop-request (jupyter-org-request): Verify marker 2019-01-16 17:56:32 -06:00
Nathaniel Nicandro
09ebdac3f0
jupyter-org-result (text/plain): Be stricter with usage of org-babel-script-escape 2019-01-16 17:56:08 -06:00
Nathaniel Nicandro
8aec6a9f2e
jupyter-org-result: Fix method arguments 2019-01-16 17:53:57 -06:00
Nathaniel Nicandro
4878f6a41e
Don't assume point is in the org-mode buffer 2019-01-13 22:37:54 -06:00
Nathaniel Nicandro
27c5b34717
Remove redundancy 2019-01-13 22:19:25 -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
36d2cd32ca
Better dynamic keybindings for Jupyter src-block's 2019-01-13 22:19:25 -06:00
Nathaniel Nicandro
30be4a37d3
Be more robust when creating request objects in an org-mode buffer 2019-01-13 22:05:35 -06:00
Nathaniel Nicandro
e2a9d9b645
Support inline Jupyter code blocks 2019-01-13 22:05:35 -06:00
Nathaniel Nicandro
5c004a43a5
Remove stale comments; fix documentation 2019-01-13 22:05:35 -06:00
Nathaniel Nicandro
05011fa04e
Support images with width and height metadata 2019-01-12 20:38:35 -06:00
Nathaniel Nicandro
2294add50b
Add jupyter-org-interaction-mode
This is a minor mode, enabled in `org-mode` buffers by default, that provides
completion and Jupyter specific keybindings in Jupyter code blocks.

Whenever `point` is inside a Jupyter code block, some of the keybindings
available in `jupyter-repl-interaction-mode` are available directly in the
`org-mode` buffer. Completion is also available from the `org-mode` buffer.
2019-01-12 20:27:19 -06:00
Nathaniel Nicandro
8f1826dabb
jupyter-org--coalesce-stream-results: Loop over list once 2019-01-12 20:21:48 -06:00
Nathaniel Nicandro
cabb7e022b
Properly handle org element objects when appending results
Any `org-element` that has a type in `org-element-all-objects` does not have a
newline appended to it when converting to a string representation. This commit
ensures that a newline is added wherever necessary for such elements.

Fixes #8
2019-01-10 23:08:27 -06:00
Nathaniel Nicandro
b2368a920c
jupyter-org--clear-request-id: Ensure the correct buffer is current 2019-01-08 20:25:50 -06:00
Nathaniel Nicandro
80ac63598f
jupyter-org-result: Handle ANSI color codes in text/plain results 2018-12-20 17:15:33 -06:00
Nathaniel Nicandro
8add10db86
jupyter-org--append-result: Fix handling of org-element objects
In particular, file link objects. When an object (in the sense of the
`org-element` API) is inserted by `org-element-interpret-data` it does not
insert a newline since objects are entities that can appear inline with a
paragraph. But for our purposes, we need the newline.

Previously we handled this by wrapping `result` in a list with a newline as the
second element before calling `org-element-interpret-data`, but this interfered
with what `jupyter-org-babel-result-p` (called by
`jupyter-org--wrap-result-maybe`) expected as its argument. With this commit,
the result is never wrapped in a list.
2018-12-19 06:54:41 -06:00