This is in replacement of the `jupyter-org-prepare-result` and
`jupyter-org-transform-result`. A single method with both primary and :around
methods is sufficient.
* jupyter-org-client.el (jupyter-org-mime-types): New variable.
(jupyter-org-prepare-and-add-result): Remove.
(jupyter-handle-execute-result, jupyter-handle-display-data):
Do the work previously done by `jupyter-org-prepare-and-add-result`.
Abstract out the python handling to a `jupyter-org-result` method.
(jupyter-org--image-result): Add PARAMS argument.
Move setup done previously in `jupyter-org-prepare-result` to this function.
(jupyter-org-prepare-result): Remove.
Replace with calls to the `jupyter-org-result' method.
(jupyter-org-result): New method.
(text/html) Remove special handling of <img> tags, this was done due to old
versions of the Julia kernel.
(jupyter-org-transform-result): Remove.
Replace with a `jupyter-org-result` :around method.
Remove all callers.
* jupyter-python.el (jupyter-org-transform-result): Remove.
Replace with a `jupyter-org-result` :around method.
* jupyter-tests.el (jupyter-org-result): Add tests.
org-result
The purpose of this function was to conveniently insert a message property list
and allow contributors to perform post insert fixing up depending on the
mimetype inserted via the method `jupyter-repl-after-insert-message`. This same
effect can be done by extending `jupyter-insert` without the need of adding a
new method.
* jupyter-repl.el (jupyter-repl-insert-message):
(jupyter-repl-after-insert-message): Remove.
(jupyter-inspect): Replace calls to `jupyter-repl-insert-message` with
`jupyter-insert`.
* jupyter-python.el (jupyter-repl-after-insert-message): Replace with
`jupyter-insert` :around method.
* 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`