Commit graph

57 commits

Author SHA1 Message Date
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
John Miller
914f68bc35 Bump version. 2016-10-12 07:01:14 -05:00
Diego Berrocal
57c97ae04b HotFix: Change # for ;; as Comment Starter
Too much Python m8
2015-08-12 21:42:33 -05:00
John Miller
d1eb867cab More forgiving version detection, doc update
Be more forgiving in detecting version; this change is mostly so EIN
works with recently released Jupyter/IPython 4.0.

Adding some additional comments to documentation to note that EIN seems
to work with Jupyter.
2015-08-12 15:17:46 -05:00
John Miller
127039e2aa Bump version.
Bump version (hope I found everywhere that it is documented). Fix
old-style print statements in one of the test notebooks.
2015-07-04 08:50:53 -05:00
John Miller
f71676ac88 Refactoring notebook management
Work in progress.

Lots and lots of changes trying to clean up code so there are not so
many checks of IPython version. Also a significant amount of refactoring
all notebook server requests code to ein-contents-api.

Also moving away from notebook-id concept; instead use notebook path to
uniquely identify notebooks/content.

Made `ein:query-ipython-version` more efficient by caching results.
2015-02-10 14:53:08 -06:00
millejoh
c0a3a7d1e0 Be more specific when creating a new notebook.
When creating a new notebook pass some additional json so IPython
knows we want to create a notebook, and not a file or directory (this
was causing problems with IPython-dev).
2015-01-16 22:01:54 -06:00
John Miller
cbf4938d76 Make ein:query-ipython-version less whiny.
Calling ein:query-ipython-version with IPython 2.x running will result
in a request error since the api REST url is not implemented. Getting a
404 response is inevitable unless the IPython devs backport the api URL,
but I can make ein complain less when this happens.
2014-12-16 14:26:51 -06:00
John Miller
d8e5a3e1bc Revert "Renaming to ein2"
This reverts commit 029f72d46d.
2014-12-09 10:42:39 -06:00
John Miller
029f72d46d Renaming to ein2
Renaming to ein2 in preparation for submitting to melpa. Note this
changes how you load ein! Call (require 'ein2) now instead of (require
'ein).

Note also that you can't load both ein and ein2 at the same time, so you
should delete ein from your packages before trying ein2.
2014-12-06 13:22:13 -06:00
John Miller
f39c57a633 Directory bugfix. First steps in IPython 3.0 support.
Fixed bug in accessing directories a depths greater than 1 level.

Some initial support for IPython 3.0 and IPEP 27. Can open notebooklists
and notebooks, but having some issues connecting to websocket.
2014-10-17 16:44:04 -05:00
Takafumi Arakaki
d0e96d0be6 Bump to 0.2.1alpha2 2013-02-10 04:12:50 +01:00
Takafumi Arakaki
93786cc61a Bump to 0.2.1alpha1 2013-01-17 11:27:39 +01:00
Takafumi Arakaki
553224241f Bump to 0.2.1alpha0 2012-12-29 18:53:05 +01:00
Takafumi Arakaki
12f01a93b2 Bump to 0.2.0 2012-12-29 18:48:01 +01:00
Takafumi Arakaki
510cb1dfcc Fix typo in ein:make-tramp-file-name 2012-12-07 21:44:42 +01:00
Takafumi Arakaki
6a9ff84a18 Add ein:version *function* 2012-09-28 16:41:35 +02:00