Commit graph

2990 commits

Author SHA1 Message Date
dickmao
0e29c39929 Fixes #356
Unforeseen "timestamp" extension breaks undo
2018-11-06 13:26:33 -05:00
John Miller
827d909113
Merge pull request #390 from sam-s/master
make ein:version interactive and include the ELPA version if available
2018-11-06 09:29:14 -06:00
Sam Steingold
4848c57c54 make ein:version interactive and include the ELPA version if available 2018-11-06 09:36:58 -05:00
John Miller
47ba0e11c7 ein-notebook: Add alias for the old ein:notebook-reconnect-kernel
John's rule of updates: respect and compassion for the user is
paramount.
2018-11-05 19:56:52 -06:00
John Miller
6438d078fd Merge branch 'pr-382' 2018-11-05 19:48:30 -06:00
John Miller
fcb4040850 ein-completer: Robuster oinfo
By covering our ears and ignoring as much as possible. Apparently SyntaxError is
not a subtype of Exception. Also need to send raw strings otherwise unicode
characters will cause fits.

Also added new command, `ein:pytools-reinject` to reinject ein's pytools code.
The name could probably use some work.
2018-11-05 17:05:38 -06:00
John Miller
3c6f29bed8
Merge pull request #387 from sam-s/master
there may be NO local jupyter installation
2018-11-05 15:46:08 -06:00
John Miller
939e4ed383
Merge pull request #385 from sam-s/master
add missing iteration arg to the kernel-start call
2018-11-05 12:46:52 -06:00
Sam Steingold
c21540f68a avoid byte compilation warnings on unused arguments 2018-11-05 11:51:40 -05:00
Sam Steingold
0469fd0e35 there may be NO local jupyter installation
(ein:crib-token--all-local-tokens): wrap execution of
  `ein:jupyter-default-server-command' in `condition-case'
2018-11-05 11:46:20 -05:00
Sam Steingold
0bbe4bcf3a add missing iteration arg to the kernel-start call 2018-11-05 09:20:07 -05:00
dickmao
d7985ffc6b sometimes travis finds bugs 2018-11-04 21:38:20 -06: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
John Miller
c92b8bdfc1
Merge pull request #380 from sam-s/master
make C-c C-x a prefix key
2018-11-04 21:15:35 -06:00
Sam Steingold
387d067558 make C-c C-x a prefix key 2018-11-04 15:07:29 -05:00
John Miller
85d80f4394 Merge branch 'fix-oinfo-errors' 2018-11-02 16:16:39 -05:00
John Miller
134b77c3be ein-pytools: Setuphook for add sys path no longer needed.
Since we inject the pytools python code directly into the kernel we no longer
need to hack on the python system path.
2018-11-02 15:57:10 -05:00
John Miller
214d57776f
Merge pull request #378 from dickmao/cleanup-websockets
Reconnect is not restart #377
2018-11-02 15:56:33 -05:00
John Miller
17fd5c721b
Merge pull request #379 from dickmao/fix-oinfo-errors
redo the test of remote doesn't have ein
2018-11-02 15:54:15 -05:00
dickmao
66c9c7a7c6 redo the test of remote doesn't have ein 2018-11-02 12:06:59 -04: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
John Miller
f2592b4896
Merge pull request #376 from dickmao/fix-oinfo-errors
a test for eldoc
2018-11-02 06:35:44 -05:00
John Miller
dd8a1607cd ein-pytools: Make pytools work over remote connections.
Python running on a remote connection doesn't know how to find files on the
local machine, apparently, so we take the route instead of sending the contents
of a temporary buffer loaded with the pytools python code to the running kernel.
2018-11-02 06:32:10 -05:00
dickmao
66e23acf3b a test for eldoc 2018-11-02 00:00:10 -04:00
dickmao
d19f696e59 add latex hotkey. need to apply rendering per ewoc lest emacs starts killing buffers 2018-11-01 22:07:05 -04:00
John Miller
78994fbe58 Always return an info object, don't always log a completer error.
I am expecting that `ein:completions--prepare-oinfo' will error out depending on
the type of python object we are looking at, so no need to log an error every
time this happens as it will unnecessarily fill the ein log buffer and generate
lots of annoying notifications in the notebook buffer.
2018-11-01 20:59:23 -05:00
John Miller
3df0552104 Get rid of log messages, fix some ein.py blunders.
*ein:log-all* will grow very quickly if we keep these log commands in.
2018-11-01 20:29:13 -05:00
John Miller
db310073c4 Robustly build oinfo cache.
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.
2018-11-01 20:26:42 -05:00
John Miller
6e7d3dd158 ein-pytools: Don't request tooltips for magic functions.
Someone wants ein to get tooltip information for magic functions - we don't
currently support this so will skip these situations.
2018-11-01 20:13:45 -05:00
John Miller
c1a8d2c720 ein-notebook: Make eldoc an optional feature.
So I and others can do testing while the less intrepid can continue with things
the way they were.
2018-11-01 20:13:45 -05: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
John Miller
ab10680acb
Merge pull request #372 from sam-s/master
"f" is required since 2018-10-15 (085a188)
2018-10-31 16:50:47 -05:00
John Miller
3117e438db
Merge pull request #371 from dickmao/bug-issue-369
Fixes #369
2018-10-31 16:50:09 -05:00
Sam Steingold
14ec7d9031 "f" is required since 2018-10-15 (085a188) 2018-10-31 13:20:44 -04:00
dickmao
35ccc3de34 Bug #369
6d42e0e771/lisp/ein-notebook.el (L419)
2018-10-31 03:51:50 -04:00
John Miller
6d42e0e771
Merge pull request #368 from dickmao/kernel-not-busy
Fix "Kernel is busy..." bug
2018-10-29 08:16:37 -05:00
dickmao
c9be1f1120 a quick hack to fix #239 (coursera) that ignores the url-retrieve way
of doing things
2018-10-29 02:00:57 -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
b950bd3a4c Fix "Kernel is busy..." bug
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.
2018-10-27 23:04:04 -04:00
John Miller
e1b26550b2 ein-dev: Don't try to require ein-autoloads.el
Fix is mostly so we can continue to build the documentation.
2018-10-26 21:20:44 -05: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
John Miller
d219d19865
Merge pull request #365 from dickmao/bug-issue-364
fix a spoonerism
2018-10-26 12:19:22 -05:00
dickmao
2aa5d004b4 fix a spoonerism 2018-10-26 12:20:07 -04:00
John Miller
ab8f881bff ein-notebooklist: Fix check for multiple servers on same port.
If `notebook list` returns more than one entry for the same url:port the
resulting structure won't be a list of lists, but rather a list of multiple
paired elements.
2018-10-23 09:02:17 -05: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
John Miller
21dca7b2f9 Merge branch 'login-staging' 2018-10-22 14:54:20 -05:00