* Define `jupyter-load-language-support` which takes a client and loads the
language support definitions of the client's kernel language.
* Call `jupyter-load-language-support` when initializing a REPL buffer in
`jupyter-repl-mode`. Note this also takes care of loading the kernel support
for a `jupyter-org-client' since a REPL buffer is setup before evaluating any
`org-mode` source code blocks.
* Move language specific methods to their own files named `jupyter-LANGUAGE.el`
Sometimes when inserting output in the REPL buffer, JIT font-locking takes
place before we are able to add the text properties preventing it from running
on cell output. This happens, for example, when inserting HTML output in a
Haskell kernel. Since cell output should never be font-locked by the REPL
buffer, explicitly disable it when inserting output.
Previously if the kernel asked for non-password input, the input sent to the
kernel would be echoed to the REPL buffer. This behavior interferes with any
output generated by the kernel in response to the input. For example calling
the license() function in a Python kernel would have the sent input
interspersed with the output generated by the license() function. Instead of
echoing the sent input, don't do anything with it.
If the first character of input cell is one of ']', ';', or '?', the underlying
Julia kernel treats the input specially as a REPL "mode", different from the
regular code input.
* Rename `jupyter-repl-after-buffer-change` to `julia-repl-do-after-change`
* Add the method `jupyter-repl-after-change` which gets called in
`jupyter-repl-do-after-change` so that kernel languages can modify the input
cell after buffer changes. The default implementation of the method does the
work that was previously done in `jupyter-repl-after-buffer-change`
This was previously used to remove invisible characters from the cell input due
to invisible characters previously added by continuation prompts. These
characters are no longer inserted so there is no need for this function. Also,
there are situations where invisible characters should still be a part of the
cell code, for example when hiding the REPL mode character for the Julia
kernel.
* Add `jupyter-repl-prompt-string` to get the text of the current REPL prompt
* Allow `jupyter-repl-cell-prompt` to be given a face to use for the prompt
string
* Only mark and unmark a cell prompt as busy, if the current cell prompt looks
like it can be marked or unmarked, i.e. is the standard input prompt
These changes are in preparation for emulating REPL modes that some languages
implement such as Julia, which updates the prompt to indicate which mode it is
in.
Since, as a hack, the `jupyter-org-client' sets the `jupyter-current-client'
based on the source code block at `point' in its `jupyter-completion-prefix`
function, check for it after calling `jupyter-completion-prefix`.
* Ensure that a REPL result is displayed correctly if it contains format
specifiers in `jupyter-repl-eval-string`
* Use `jupyter-with-message-data` in `jupyter-repl-eval-line-or-region` and
ensure that ANSI color codes are not shown when displaying results.
* Add a `C-x C-e` binding to `jupyter-repl-interaction-map`
Previously an invisible character would be added in the
buffer to prevent the margin from inheriting any text
properties but this is unneeded since the default margin
does not contain any text that can inherit the properties.
This replaces the behavior of the `:input-reply` message
type. A kernel sends an `:input-request` to the frontend
and the client sends an `:input-reply`.