Commit graph

73 commits

Author SHA1 Message Date
dickmao
54cb27701f remove longstanding recursive requires workaround 2020-02-29 22:35:49 -05:00
dickmao
05b7cfbbf8 ein:urls 2020-01-15 12:42:43 -05:00
dickmao
ba530cfa95 before embedding notebooklist reloader into ein:notebook-open 2020-01-13 11:38:21 -05:00
dickmao
8a545c508b close notebook on delete 2020-01-10 23:58:51 -05:00
dickmao
c10f4a93b0 able to connect to gke 2020-01-05 18:16:05 -05:00
dickmao
f7180405d6 makes test 2020-01-02 20:09:42 -05:00
dickmao
e12a33588d replace ein:aif with aif 2019-11-24 00:17:52 -05:00
dickmao
d0d13c8277 get 25.1 to compile 2019-11-13 17:46:50 -05:00
dickmao
b8d265f419 fix some old tramp tests 2019-11-13 12:50:45 -05:00
dickmao
bcf1c2ac55 purge
purge

align pm:get-span no major mode error with diagnostic

purge
2019-11-08 16:05:11 -05:00
dickmao
3f6e507857 Do not assume "notebook" subcommand
Some users run jupyter via `jupyter-notebook` instead of `jupyter`,
and break because we unilaterally impose the "notebook" subcommand.

Those users can now:
```
M-x customize-group ein
Jupyter Server Use Subcommand: Omit
```
2019-06-05 14:30:26 -04:00
Federico Beffa
9b7b88c5d4 Normalize kernel language name: Don't change case. 2019-05-29 17:02:16 +02:00
Federico Beffa
f0c9812c5a Normalize the kernelspec language string. 2019-05-27 16:24:47 +02:00
dickmao
234cf391f9 Polymode
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
2019-04-02 09:35:17 -04:00
dickmao
ed6482096e Add ob-ein tests
Also, speed up login and other cleanups
2019-02-19 10:06:15 -05:00
Sam Steingold
48fa153435 Use standard functionality instead of ad hoc functions
(ein:filter identity ...) ---> (delete nil ...)
ein:filter --> seq-filter
hash-vals --> hash-table-values
hash-keys --> hash-table-keys
2019-01-15 11:26:09 -05:00
John Miller
ed154e91e0
Merge pull request #443 from dickmao/bug-issue-436
Respect cursor_start and cursor_end in matches
2018-12-29 17:05:47 -06:00
dickmao
e328e86105 Clarify what notebook version means
Say `Contents API 5.7.4` instead of `Notebook v5` in notebooklist.

EIN doesn't care about the python version (2.7, 3.5) or the
ipython version (5.8.0, 6.2.1).  The "jupyter notebook contents api"
version (currently at 5.7.4) is the thing that matters.
2018-12-25 10:59:18 -05:00
Sam Steingold
25835fdce4 ein:version: accept optional prefix arg to copy version to clipboard 2018-12-24 11:20:27 -05:00
dickmao
f0984eab55 jupyterhub basic (PAM only)
`ein:login` or `ein:notebooklist-login` is the preferred way to access
jupyterhub, although `ein:jupyterhub-connect` is still autoloaded.
2018-12-04 18:31:44 -05:00
Sam Steingold
5af9956dba use defconst to define ein:source-dir
This resets `ein:source-dir's value every time the file is reloaded,
which means that `ein:dev-reload' as well as elpa upgrades will reset it.
2018-11-12 09:04:44 -05:00
Sam Steingold
4848c57c54 make ein:version interactive and include the ELPA version if available 2018-11-06 09:36:58 -05: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
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
16cb32a1a6 more request-curl callback protections 2018-10-20 21:37:47 -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
461b268eea retry kernelspecs 403 2018-10-18 19:05:17 -04:00
dickmao
c89a0a8887 it a'int easy being green. 2018-10-18 16:23:49 -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
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
John Miller
b94a8cf0d3 Update documentation.
Preparing for version bump.
2018-09-18 22:05:44 -05:00
John Miller
895777f5ea Try again to fix eager macro expansion error on travis. 2018-05-31 13:15:04 -05:00
John Miller
59d2b83a21 Maybe fix eager macro expansion error on travis. 2018-05-31 07:56:38 -05:00
John Miller
d1c3464583 Formatting cleanup, sort notebooklist entries by name.
Taking some initial steps to implement features requested in #293 by @sam-s.
2018-04-22 10:22:11 -05:00
John Miller
847f7ca5a1 Prepare for v0.14, properly save and load hy codecells. 2018-04-14 13:29:16 -05:00
John M. Miller
a3511de228 ein-core: Continue efforts to make version checking more robust.
Also ensure that old byte-compiled files are deleted when rebuilding ein via
`ein:byte-compile-ein'.
2018-01-10 09:13:33 -06:00
John Miller
a20562e1fc Prepare for version bump. 2017-10-24 11:03:50 -05:00
John Miller
9a1579d5f6 ein-jupyterhub: Support contents api
When running against jupyterhub master (which will someday be v0.8) can know log
in and make calls to the contents api.

Everything is working except for opening websocket connections.
2017-07-25 15:36:07 -05:00
John Miller
0196407b42 ein-core: More stable ipython version checking.
Try to be more graceful when a null sneaks in for the server version. Also
experiment using deferred:$ in `ein:jupyter-server-start'.
2017-06-02 07:24:08 -05:00
John Miller
e3eca1115d ein-notebooklist: Avoid auth issues when changing host url.
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).
2017-05-30 14:05:02 -05:00
Charl P. Botha
61ba1e9a30 ein:get-kernel works in edit-cell-mode
Modify ein:get-kernel so it can retrieve the kernel from the local
worksheet variable in edit-cell-mode. This is done so that functions
such as ein:completer-complete and tooltips / inline help are
availeble to be bound by the user.
2017-03-22 12:22:36 +02:00
John Miller
06fbab9058 Preparing for a version bump. 2017-02-16 09:19:40 -06:00
John Miller
0ede9e7ef6 Typos in slot name accessors, fix version cache to accept URL strings.
Mistyped some accessors for worksheet slot accessors. Correct
`*running-ipython-version*` hash to accept strings (i.e. URL's) as well as just
port numbers.
2017-02-01 09:51:12 -06:00
John Miller
94e334cbf0 Try to keep long running sessions from expiring
The function `ein:notebooklist-enable-keepalive` and
`ein:notebooklist-disable-keepalive`, respectively enable a timer that
ocassionally (on the order of hours) sends a query to the notebook server. The
goal is to keep cookies and sessions from expiring in long running notebooks.
We'll see if it works.
2017-01-31 10:44:04 -06:00
John Miller
b52ccbd46d Version bump, integrate docs into Cask, new doc theme.
Using alabaster for the documentation theme. Building documentation now relies
on having cask present, which does a better job of tracking dependencies than
the old way.
2017-01-17 06:55:44 -06:00
Sam Steingold
92aabe399c string-to-int is obsolete and was removed from Emacs 26.1 2016-11-16 14:14:33 -05:00
John Miller
c70dee7733 Taceback from cell edit buffer, more informative version
Jump to tracebacks from cell edit buffers.

Slightly more informative on version of jupyter we are working with.
2016-11-05 17:49:52 -05:00
John Miller
8e3764044c Update documentation, bumpb version. 2016-10-30 18:37:14 -05:00
John Miller
bdc140e446 Bump version to 0.11.0 2016-10-20 12:28:42 -05:00