Commit graph

789 commits

Author SHA1 Message Date
Nathaniel Nicandro
f8768b7f87 jupyter-markdown-follow-link: Call jupyter-inspect when not in the REPL buffer 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
768d640beb Use with-silent-modification in jupyter-repl-append-output 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
2841753bad Consider the active region when obtaining the jupyter-code-context 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
6ab44867d1 Fix code position in jupyter-line-context
The cursor position is 1 relative, I think. At least this
gives the right results using the Julia kernel.
2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
5f091d972a Remove unused dependency 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
6f5c106ed5 Add note about mapping kernel languages to Emacs modes 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
4abf2daafa Update completion prefetching
* Add `jupyter-completion-prefetch-p` which determines if a
  prefetch should be performed.

* Remove `jupyter-completion-last-prefix`. Store all of the
  necessary information in `jupyter-completion-cache`.
2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
a4a4bfb4c8 Ask to start a new REPL if one isn't available in jupyter-repl-associate-buffer 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
4f73d1397e Ensure the buffer local value of syntax-propertize-function is set
This caused much headache. This variable really should be
automatically buffer local.
2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
5caf82cf81 Fix continuation prompt insertion
* Remove the invisible character inserted along with the
  continuation prompt as it is really unneeded.

* Make the inserted space two characters wide. For some
  reason this is needed, otherwise the continuation prompt
  will be one character short when starting up a REPL from
  the byte compiled functions. Curiously when I evaluate
  `jupyter-repl-insert-prompt` in the current Emacs
  session, the prompt looks fine afterwards.
2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
c651f16ae2 Check for both end of word and symbol in jupyter-completion-grab-symbol-cons 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
abdf63a517 Only fontify syntactically when the text is not considered fontified
Text may not have a `font-lock-face` property, but may be
marked fontified if it has a non-nil `font-lock-fontified` property.
2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
52a44b7e30 Take into account syntax-propertize-function in jupyter-repl-initialize-fontification 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
33495f0281 Don't try to insert continuation prompts on self-insert-command 2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
4c95c8c6d2 Add note about possibly using indirect buffers 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
ed094f93ea Use buffer ticks in jupyter-repl-indent-line
Previously a string comparison was done to check if the
cell code was indented, this is faster.
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
6671904cee Fix edge case in jupyter-repl-history--previous
If there is no history at all to go back to, return nil.
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
59eba9d3c4 Check for widget dependencies in jupyter-repl-insert-data 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
cadc26f32b Prioritize mimetypes that have dependencies in jupyter-repl-insert-data 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
3d6d90d6da Simplify jupyter-repl-insert-html
Insert the HTML directly into the REPL buffer and use
`shr-render-region`. This avoids copying the HTML to a
temporary buffer first and extracting the rendered HTML to
place in the REPL buffer.
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
f4d375a380 Add whitespace after inserting images 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
3145453d93 Fix svg image display 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
39382227e7 Take into account newer versions of zmq 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
a9246fcecb Rename with-jupyter-* to jupyter-with
Ensure that all functions and macros have the same
pseudo-namespace
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
31d7cfe34f Do not supply new arguments for obtaining the completion prefix 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
a26655c66f Handle python kernels specially when constructing completion candidates
The python kernel includes every attribute up to the parent
object, we need to split on the dots to only have the last
attribute or method since that is what the bounds are in
the completion mechanism.
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
c9e8b952eb Consider packages like smartparens when expanding argument snippets 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
603ab12444 Ensure lock files are enabled when testing them 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
394a82a5c2 Update note on injecting render parameters for displaying org-mode results 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
34e52de1d4 Simplify inspect requests
* Rename `jupyter-repl-inspect-at-point` -> `jupyter-inspect-at-point`

* Refactor inspection
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
3d8049da6d Reduce the use of deprecated functions 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
4bb716e401 Update test to remove old jupyter-request slot 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
da6587f5f6 Only modify the result parameters if needed in jupyter-org-add-result 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
1198965d57 Documentation changes 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
ac812a8599 Add a custom method generalizer for a kernel language 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
be06102c99 Explicitly make REPL variables buffer local 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
c48d5ca814 Fix jupyter-repl-fixup-font-lock-properties 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
854f660bd3 jupyter-find-kernelspecs allows a regular expression instead of a prefix 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
21ca6ead04 Use filter-buffer-substring-function to extract cell code 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
b00b28490f Handle terminal control codes in REPL output 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
6e59813dc4 Add to CAPF for code block completion when org-mode is enabled 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
f0fe7ff5e8 Document the status slot of jupyter-async-channel 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
ceed853658 Convert jupyter-hb-on-kernel-dead to a method 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
b6428b441f Fix the heartbeat channel implementation
* Actually set the paused slot to nil when un-pausing the
  heartbeat channel

* Ensure the heartbeat socket is actually a socket when
  receiving. This is to handle edge cases when the
  heartbeat channel is stopped, but there still is a timer
  left in the `timer-list`.
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
0735198579 Update channel tests 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
35433ea68d Update jupyter-hb-channel test 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
58078c4e69 Document behavior of jupyter-repl-associate-buffer 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
14ef40acd4 Reduce priority of jupyter-land method context 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
6ca612168a Handle edge case when obtaining completion prefix 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
9cd52d25c3 Cleanup CAPF when jupyter-repl-interaction-mode is disabled 2018-10-25 23:17:25 -05:00