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
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).
Merge the login and open commands (open aliased to login). Add login
tests described in #352.
Attempt to improve user experience by synchronously executing
`ein:jupyter-server-start`. `ein:dev-prefer-deferred` custom variable
allows easy switch to compare sychronous versus old asynchronous behavior.
```
"http://localhost:8888"
"http://localhost:8888/"
"http://127.0.0.1:8888"
"http://127.0.0.1:8888/"
"8888"
8888
```
Ideally these should converge to the same thing. Since many hash
tables are keyed off `url-or-port`, forgetting to
normalize `url-or-port` with `ein:url` leads to missed cache hits and
general malaise. So we try to do that.
Address a FIXME: apply callbacks to `ein:notebook-list-login-and-open`.
Removed py3.5 from travis build matrix to reduce developer strain.
```
"http://localhost:8888"
"http://localhost:8888/"
"http://127.0.0.1:8888"
"http://127.0.0.1:8888/"
"8888"
8888
```
Ideally these should converge to the same thing. Since many hash
tables are keyed off `url-or-port`, forgetting to
normalize `url-or-port` with `ein:url` leads to missed cache hits and
general malaise. So we try to do that.
Address a FIXME: apply callbacks to `ein:notebook-list-login-and-open`.
Removed py3.5 from travis build matrix to reduce developer strain.
Use deferred and callbacks instead of `:sync t` for tkf requests which
is known to have issues. Query server attributes once on
notebooklist-open to avoid sequencing issue #176 (but allow Resync).
Under curl backend, a second request for the same "key" as a pending
request will abort the latter, which has resulted in a clobbered
curl-cookie-jar file, so merely warn and don't abort.
Fix#176
Instead of always prompting the user for the path to the jupyter
executable, it will try to use the value of `*ein:last-jupyter-command*' or
the value of the customizable variable `ein:jupyter-default-server-command'
when the `ein:jupyter-server-start` command is called without C-u prefix arg.
Not at all sure why, but succesfully starting jupyter and detecting login token
info is sensitive to this factor. On Windows, a call to accept-process-output
prior to the deferred chain also works, but unfortunately seems to cause issues
on some Linux installations.
For the moment a factor of 10 seems to work, but we will see what feedback from
the community is. This may need to be a customizable variable.
Optional argument PROCESS means do not return until output has been
received from PROCESS.
If jupyter notebook is fast enough and made all the outputs, at the
time of invoking accept-process-output will block until timeout.
Revert "ein-jupyter: Try waiting for process output before logging in."
This reverts commit 9cae1ba153.
Don't think we were handling https:// url's correctly.
Also some code cleanup in ein-connect; fix longstanding bug in ein:load-files,
and tweak default timeout for starting a jupyter session from within emacs.
Trying to increase reliability of starting a juptyer server from Emacs. Deferred
is cool, but a pain to understand for this old brain.
Fix some typos in ein-ob and be smarter selecting completion backend when
connecting a python buffer to a jupyter notebook.
Instead of just enabling auto complete why not just connect to the notebook ala
`ein:connect-to-notebook`?
Update dependencies documented in README.rst
Force version check when starting the jupyter server - ein seems to be easily
confused in this regard.
Order entries in notebooklist by file type (i.e. file extension). Add function
'ein:jupyter-server-stop to 'kill-emacs-hook.
Fixed link in documentation.
Add configurable timeout (see `ein:jupyter-server-run-timeout`) that will
hopefully abort calls to `ein:jupyter-server-run` that hang; this is to help
with issues like those reported in #176.
Also update documentation, dependencies in preparation for 0.13.0 release.
It seems there are enough people out there still on Emacs 24 to warrant undoing
some of my recent moves away from eieio to cl-generic. For the near future I
will try to keep any changes that are incompatible with Emacs 24 to a
development branch. There is still probably plenty of opportunity to make the
code more future-proof for an eventual move away from eieio (I'm looking at you
oref and sref...)
Starting ipython/jupyter notebook servers from EIN should now be more robust.
Will try to detect correct url/port whether or not token authentication is
enabled, and if not will try to alert the user.
Also using `start-process` to run the notebook server - I think this will allow
compatibility with emacs24.
When calling `ein:notebooklist-change-url-port' first make call to
notebooklist-open to ensure cookies are properly created/refreshed before trying
to save notebook and restart kernels.
Note this uses a bit of magic from deferred, which was already being used in
ein-jedi.el, but somehow never made it into the list of required pacakges. We
are now correcting that oversite.
Extend the timeout when querying the ipython/jupyter version. Also try to detect
when timeouts occur and in such cases temporarily assume a version (4 for the
moment).
This reduces some of the complexity in testein.py, but unfortunately running
tests is still unreliable. Running batchwise tests don't work at all in Windows,
and running from inside emacs tests often need to be run multiple times before
they pass.
The worst offender is the delete notebook test, which will pass on usually only
1 out of 3 tries.
Testing seems to have revealed a couple bugs, so win??
When calling `ein:jupyter-server-stop` ask to user if they are sure and also
give them the option to save any unsaved notebooks before killing the server.
Before closing the server also close any open notebook buffers.
For the moment we only support current version of jupyter (i.e. 4.3.1 or
greater).
The special commands are `ein:jupyter-server-start` to start a notebook server
and `ein:jupyter-server-stop` to, clearly, stop a notebook server.
On starting a server EIN will try to determine the url and token for accessing
the notebook server, login and open the notebook list automatically.