New hooks `ein:pre-kernel-execute-functions', `ein:on-execute-reply-functions'
and `ein:on-shell-reply-functions'. See variable documentation for more
information.
Similar to having an input area face, we now have faces for errors &
normal output in the output area. They're currently empty to preserve
existing appearance.
(ein:notebooklist-sort-field): New custom var, replaces `ein:%item-sort-param%'.
(ein:notebooklist-sort-order): New custom var, replaces `ein:%item-sort-order%'.
(ein:make-sorting-widget): New macro.
(ein:nblist--sort-group): Fix the meaning of :ascending & :descending.
(render-directory): Use `ein:make-sorting-widget' to define widgets;
use the new custom vars instead of the internal %% vars.
Not much of a UI at the moment, but notebooklist entries can now be sorted
either by name or by date last modified. Jupyter does not provide size
of each item, that I can see (for the moment), so currently not possible to sort
by that parameter.
Defer the deferred...
A bit less cryptically - wrap call to ein:shared-output-eval-string in a
deferred construct to ensure proper sequential execution of autoexec cells.
Try to gracefully handle multiple calls to `ein:shared-output-eval-string' by
wrapping calls to deferred:$. The deferred chain will not call
`ein:cell-execute' if the cell is already running.
Also did a bit of refactoring in ob-ein.
User can now ask ein to truncate long outputs in a worksheet. Use the
customizable variable `ein:truncate-long-cell-output' to control this behavior.
Set to nil to have no truncation, otherwise an integer value specifying the
number of lines to keep before truncating.
Loading large notebooks (>1M) can be slow. At least some of this is due to
downloading from the jupyter server, but this operation is asynchronous and
should not block emacs. My suspicion is that when Emacs blocks it is when it is
generating the internal data structures used to represent the notebook in emacs.
This is somewhat unavoidable, but part of the slow down may be due to reaching
the cons threshold. These changes try to temporarily increase the cons threshold
while loading the notebook. We'll see if it helps at all.
In tracebacks, we detect if ein is connected to a remote host, and if so try to
create a TRAMP friendly path when jumping to files from a traceback.
In response to #263.
Passing "default" to `ein:get-kernelspec' would cause it to return a string
naming the actual kernelspec, which just won't do. So we look for that case and
then look for the real kernelspec.
Inspired by @khinsen's ob-ipython-async, automatically generate filenames for
inline images. That is, make :image an optional argument for ein source blocks
in org.
EIN historically used a call to python getcwd and gethostname to get information
about the currently running kernel. This won't work with non-python kernels, so
I this is an initial attempt to abstract out the call and make it language
agnostic. Still only works in Python, but at least should not cause errors with
other languages.