Introduce new user custom variable `ein:on-kernel-connect-functions' which is an
abnormal hook called after a kernel connection is made. All functions in the
hook are called with the connected kernel as an argument.
This replaces the old, unused `ein:kernel-run-after-start-hook' function.
Initial SIGTERM prompts server to dutifully shutdown kernel, but
another SIGTERM necessary to kill server. Perhaps ipython changed
since the last time I tested this.
Ipython doesn't send a display_data message upon initial plot
request. This is probably our bug, or is it? Document this bug in an
ecukes test.
Also enforce emacs version >= 25
M-x customize-group RET ein
Toggle Ein:Polymode
Avoid trying to emulate jump-to-definition, eldoc, and autocompletion
functionalities that Elpy will always do better.
Fixes#497#482#418
Do not assume python... leverage ESS to improve R interaction.
Fix both undo and fontify in the presence of toggling cells (`C-c
C-t`)
Fix and test switching kernels
As `ein:notebok-kill-kernel-then-close-cmmand` must wait for the
server to delete the session, the buffer wouldn't disappear right
away, leaving the user nonplussed whether the `C-c C-q` took. Display
a status message "Ending session" with a modest animation instead.
Also add a "Stop" test for notebooklist. Sorry about breaking "Stop"
in ee3b0f0
Once upon a time it was possible to stop/delete/kill running kernels from the
notebooklist buffer regardless of whether there were any open notebooks
associated with the kernel session.
Some commmits ago this behavior was changed, and the code has recently required
that there a notebook buffer associated with the active kernel/session exist
before the stop command will proceed. This is incorrect behavior and is
inconsistent with the interface provided by the notebook web browser interface.
Kernels and notebooks are independent entities and should be treated as such in
the code.
Renaming of functions with better understanding of reconnects. Under
the original logic, reconnecting blithely created a new session if
the original no longer existed. Now it will alert the user when this
happens.
Also hopefully fixes#381 as there was a bug of missing argument not
being caught by lisp's undisciplined typing.
Upon disconnection, the jupyter server apparently returns the same kernel for a given
notebook path input. So reconnect is a thing, and restart is very
distinct from that.
Fixes#377
EIN tries to build a cached of pdef's for all potential completion symbols. This
is problematic because not all completion symbols have a pdef and can cause
python to throw exceptions in entertaining and hard to catch ways. We take a
liberal approach and ignore anything that throws an exception when we try to
inspect it.
Eldoc support should also be more robust because of these changes as well.
Coursera appears to kill websockets every minute or so, and I'm
observing firsthand the buggy behaviors described in #356. This PR
cleans up the websocket code and kernel restart logic. Removed
backwards compatibility for the v2 messaging api
as keeping it in the presence of the refactoring would make it more
broken that it already was.
One line change to fix header not updating after cell execution
(keeps saying "Kernel is busy").
The bug does not manifest when running with `ein:debug` true since
EMACS's display loop updates more frequently with debug messages.
In tracking this bug, noticed eldoc support isn't quite there.
`__import__('ein').print_object_info_for(%s)` appears in
`ein-completer` and `ein-pytools`, and is invalid python syntax
afaict. Took a few steps to make it whole, but incomplete.
As emacs users we prefer and have the luxury of fuzzy file navigation
via ido and projectile. From a notebook or notebooklist buffer, the commands
`C-c C-f` ein:file-open
`C-c C-o` ein:notebook-open
offer an ido alternative to point and click navigation.
To populate the ido lists, retrieving the content hierarchy is on by
default. Two custom variables determine how wide and deep the content query
probes (currently at 2 levels deep and 6 directories wide). Set both
to zero to turn off.
tkf half finished code to quickly go from local file buffers to notebook
mode via `C-c C-z` or `C-c C-o`. This is now possible. EIN will
start the server from a suitable parent directory of the visited file.
Enable ido completion for `notebooklist-login`.
Remove the albatross `ein-loaddefs.el` in favor of more standard
`ein-autoloads.el` that is not git tracked.
Convenience `make install` from git source (local alternative to
melpa).
New hooks `ein:pre-kernel-execute-functions', `ein:on-execute-reply-functions'
and `ein:on-shell-reply-functions'. See variable documentation for more
information.