Commit graph

37 commits

Author SHA1 Message Date
dickmao
36727c9415 new notebook needs more time 2018-12-02 17:11:55 -05:00
dickmao
8c3d4fc502 keep fortifying 2018-11-28 22:25:20 -05:00
dickmao
52ac49cc5e fortify travis defences 2018-11-28 21:29:32 -05:00
dickmao
d4ef4ed81c Allow disabling of autocomplete
```
M-x customize-group RET ein-completion
```
Set `Ein:Completion Backend` to `ein:use-none-backend`, Set `State` to
`Save for Future Sessions`.

Also use `featurep` and `with-eval-after-load` to clean up the
subpackage requiring gymnastics.
2018-11-28 17:45:23 -05:00
John Miller
6a23dded5a Update tests for change in notification messages. 2018-11-13 20:58:43 -06:00
dickmao
6ca6752319 C-c C-q improved visual feedback
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
2018-11-10 00:09:44 -05:00
dickmao
270f157751 squash one of possibly many bugs that could cause intermittent travis failure 2018-11-08 11:36:10 -06:00
John Miller
55f44434b7 Merge branch 'pr-393' 2018-11-07 22:00:49 -06:00
John Miller
ad35ef1b22 Fix notification test to be consistent with new notification strings. 2018-11-07 21:59:41 -06:00
dickmao
84fa177a1e When I C-c C-c also C-c C-r if necessary
If user wants to execute cell, and the connection is down,
automatically reconnect, then execute the cell.
2018-11-06 18:36:46 -05:00
dickmao
7d31fe7f34 fix the osx testing bug 2018-11-04 21:38:20 -06:00
dickmao
ee3b0f095c Follow-up to cleaning up websockets
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.
2018-11-04 21:38:20 -06:00
dickmao
5023b0796b Reconnect is not restart #377
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
2018-11-02 11:32:12 -04:00
dickmao
db2856f445 Restart if kernel still alive needs to work 2018-11-01 20:08:10 -04:00
dickmao
d621944797 Clean up websocket callbacks
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.
2018-10-31 23:38:45 -04:00
dickmao
80839a1d77 finish previous commit 2018-10-28 14:38:53 -04:00
dickmao
aaeffa4596 end deferred chain on bad login 2018-10-28 13:48:53 -04:00
dickmao
0490031ec8 Sane File Navigation
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).
2018-10-26 18:40:19 -04:00
dickmao
e693a53e5a master fixes
ein:url normalization issue (fails the passworded server test).
"No servers running here" warning is unsettling for I think the
majority of users who do not run jupyter locally.
2018-10-23 02:12:45 -04:00
John Miller
309e21c119 Merge branch 'master' of ssh://github.com/millejoh/emacs-ipython-notebook 2018-10-22 18:15:05 -05:00
dickmao
3ba5548208 Issue #355 - remove an endless loop
Remove a waiting for godot loop in `ob-ein`.
Add a test stub for ob-ein.
2018-10-21 14:44:11 -04:00
dickmao
16cb32a1a6 more request-curl callback protections 2018-10-20 21:37:47 -04:00
dickmao
7a6d3c072b appveyor for msys2 2018-10-20 20:19:58 -04:00
dickmao
0345ed0b33 Try to address windows NT unseen. Add osx. Add ipython 7.0.1. 2018-10-20 00:12:34 -04:00
dickmao
085a188b20 Streamline login
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.
2018-10-17 16:52:10 -04:00
dickmao
c424f2ae5a workaround for emacs-26.1 travis
Delete the org-plus-contrib dependency in Cask via a fast switcheroo
in install-cask.sh
2018-10-12 21:55:33 -05:00
dickmao
bc10cea743 Normalize url-or-port
```
"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.
2018-10-12 21:55:33 -05:00
dickmao
11c2245c41 Asynchronize all server communication
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
2018-10-07 00:40:48 -04:00
dickmao
ad8408dfb7 Implement undo
`M-x customize-group RET ein`
Toggle `Ein:Worksheet Enable Undo`
Save for Future Sessions
Restart emacs or kill/restart notebook

Fixes #338
2018-10-02 10:00:25 -04:00
dickmao
ec28cbe708 revive tkf tests
`make test-unit`
`make test-int` (formerly `cask exec ert-runner`)
An intermittent travis-melpa issue is solved by gonewest818.
2018-09-27 00:52:00 -04:00
John Miller
acb79501f0 ein-notebook: Fix ein:get-kernelspec when name is "default"
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.
2018-02-27 16:08:46 -06:00
John Miller
a196ace732 It's the travis update shuffle.
Update the emacs versions I'm testing against.
2018-02-27 15:40:36 -06:00
John Miller
04c829d0a5 Tweaking travis config, give more time for testing server to startup. 2018-02-27 15:04:48 -06:00
John Miller
9d5309af59 Trying something new with testing.
Let's do this with ert-runner instead of python. Maybe it will work for once.
2018-02-27 14:38:13 -06:00
John Miller
71d8994ebb Undoing earlier bone-headedness
Finally getting Sam's PR right (sorry about that, Sam). Getting the
mocker subtree into the right place because apparently I cannot type.
2016-09-23 10:37:48 -05:00
John Miller
a89414b2a2 Merge commit '13d3f30f34750be1d6d34c51c554dd07298be81e' as 'test/mocker' 2016-09-09 10:10:36 -05:00
John Miller
13d3f30f34 Squashed 'test/mocker/' content from commit a1ddf87
git-subtree-dir: test/mocker
git-subtree-split: a1ddf87150f67306ae8da927117063c75588be30
2016-09-09 10:10:36 -05:00