Commit graph

124 commits

Author SHA1 Message Date
Patrick
3466d0f87d Cleanup - undo unrelated changes
I had made a few other changes to satisfy my linter.  This removes
those changes so it's more clear what I was editing to change the
rendering order.
2018-03-25 13:42:35 -07:00
Patrick
e2734c9749 You can now customize order with ein:notebook-list-render-order 2018-03-25 13:30:50 -07:00
Patrick
adc85796e4 Works, puts open notebooks above directory 2018-03-25 12:32:31 -07:00
John Miller
a8fc712ca8 ob-ein: Wrap if-let* var list properly.
Make async work a little better, but can still have problems if one tries to
execute several source blocks at once.
2018-03-10 07:07:37 -06:00
John Miller
baec3d8577 ein-notebooklist: Fix #278. 2018-03-08 14:08:45 -06:00
John M. Miller
2f722a31a2 ein-notebooklist: Fix for #260.
Force a query of available kernelspecs when calling `ein:notebooklist-open'.
Idea is to catch when user installs a new kernelspecs while ein is active.
2018-01-10 09:36:27 -06:00
John Miller
f63451ca03 ein-notebooklist: Improved ein:notebook-update-url-or-port.
As well as going to a non-deferred implementation for
`ein:notebooklist-change-url-port' the code now properly restarts the nb kernel
when changing the server the notebook is running on.

Also a small change to the formatting of the notebooklist buffer.
2017-11-07 15:14:45 -06:00
Benda Xu
6a9df3680c lisp/ein-notebooklist.el: add missing '.'. 2017-10-21 22:28:17 +09:00
Benda Xu
adce9b3b24 execute and debug notebooklist-open early. 2017-10-21 22:28:17 +09:00
Benda Xu
c759c9a280 lisp/ein-notebooklist.el: print password explicit in debugging mode. 2017-10-21 22:21:05 +09:00
John Miller
c0eabfe2ad ein-notebooklist: Fix possible bug specifying notebook urls
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.
2017-10-03 10:04:41 -05:00
Benda Xu
745673926a lisp/ein-notebooklist.el: defer notebooklist instead of buffer.
The buffer could be killed after the callback.
2017-09-30 21:34:00 +09:00
Benda Xu
077de69d94 lisp/ein-notebooklist.el: dash is needed to provide -group-by. 2017-09-30 14:35:36 +09:00
John Miller
15ad1c49c7 ein-notebooklist: Order notebook list by file type.
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.
2017-09-12 16:22:19 -05:00
John Miller
aebdbc1eb8 ein-cell: Fix saving images in worksheets.
Images weren't being save to json in the way they should have. Mostly had to do
with how the attirbutes were being ordered. This is still, unfortunately, a
nasty bit code but it still seems to work.
2017-06-30 21:41:16 -05:00
John Miller
c1d263fa13 ein:notebooklist: A faster, better change url.
Make the process of changing URL's via `ein:notebooklist-change-url-port'
smoother and more user-friendly.
2017-06-03 15:45:28 -05:00
John Miller
22cc948975 ein:notebooklist-change-url-port: Better deferred syntax, use lexical bindings. 2017-05-30 14:33:31 -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
John Miller
4a487ab9b8 ein-notebooklist: New function ein:notebooklist-change-url-port
Like `ein:notebook-update-url-or-port', but for all the notebooks opened from the
current notebooklist buffer.

Fix bug in `ein:notebook-update-url-or-port' that was keeping the kernel from
restarting.
2017-05-24 09:53:58 -05:00
John Miller
88595dede6 Support filetypes other than ipynb
EIN now lists other file types in notebooklist buffer and will allow user to
open those files for editing. The new buffer will get the right major-mode most
of the time, but has a hard time getting the line coding right on Windows
platform.
2017-04-20 07:47:05 -05:00
John Miller
d189d8b924 Implement uploads per #170. 2017-04-02 14:33:56 -05:00
John Miller
3fc73b98d8 Attempt at workaround for curl cookie jar issues
Login and notebooklist requests have a tendency to fail with the curl request
backend when there is no cookie jar file. Request will create the cookiejar, but
apparently with the asynchronous nature of ein this happens too slowly causing
content REST queries to fail. My tactic here is to repeat the call once, and
only once when a failure is detected. It is a difficult problem to reliably
create so I'm not sure if this is a good fix or not. Time will tell.
2017-02-17 15:06:59 -06:00
John Miller
58d8142d0a Numerous documentation updates.
Get rid of ein-sections: you are not yet ready for the world young man!
2017-02-16 09:01:14 -06:00
John Miller
4ccaa9337c Allow keepalive to be automatically enabled.
When the customizable variable `ein:enable-keepalive` is non-nil EIN will
automatically call `ein:notebooklist-enable-keepalive` when calling
`ein:notebooklist-open`. Keepalive has also been tweaked to make sure it does
not create multiple timers.
2017-02-15 19:33:35 -06:00
John Miller
a4f9128182 Steps towards sections. More stable notebooklist buffers.
Initial steps integrating magit's sections into ein. Also an attempt to make
notebooklist buffers more "stable" by adding a slight pause during session
queries.
2017-02-12 22:09:44 -06:00
John Miller
8ec5d4638e Prototyping the object inspector buffer.
Display value of object's __repr__, link to source when available, and
documentation.

Adding command and keybinding (C-ci) to notebook buffer keymap.

Get rid of unnecessary api check when rendering notebooklist buffer.
2017-02-06 20:19:20 -06:00
John Miller
4e482cafd9 Stop being so clever with error handling. Stepping away from eieio.
Automatically calling ein:notebooklist-login when a content API calls is a BAD
IDEA. Much better to warn and suggest, and if debugging is enabled throw the
error so hopefully a backtrace can be generated.

Taking some initial steps away from eieio and towards cl-generic.
2017-02-01 09:25:47 -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
e226b30139 Follow redirects, numerous other fixes.
Content api tries to handle redirects, pointing new content towards the
redirected url instead of the one supplied by the user. Login with redirects not
working, though.

Other fixes:

 - Fixed bug in ein-ac that was generating errors outside of ein buffers.
 - New function `ein:pyools-set-figure-size` as shortcut for modifying
   matplotlib figsize rcParam.
 - ob-ein will output tracebacks when ein source block generates an error.
2017-01-11 07:42:06 -06:00
Sam Steingold
5d06c91349 autoload ein:notebooklist-login (issue#154) 2016-12-27 12:04:25 -05:00
John Miller
9468f40bce Better kernelspec display name, pytools only for python kernels.
Prettier kernelspec names in notebooklist buffers. Only load pytools for python
kernels, which hopefully will help with connecting to non-python kernels.
2016-12-22 14:04:51 -06:00
John Miller
495d652ee0 Cosmetic updates to code formatting. 2016-12-18 19:27:35 -06:00
Josiah Schwab
23c8148cb7 Update notebooklist url functions to work with jupyter
Previously, base-path would be nil when version was 4 (corresponding
to the current jupyter release).
2016-11-11 09:48:47 -08: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
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
706ff2184a Merge branch 'pr/117' 2016-09-19 10:46:43 -05:00
John Miller
ed70a26700 Set local keymap for ein's derived modes. 2016-09-19 09:02:35 -05:00
John Miller
ef949a189d Revert "derived modes inherit from special-mode or view-mode as appropriate"
This reverts commit 99de3360c3.
2016-09-15 14:14:42 -05:00
Sam Steingold
99de3360c3 derived modes inherit from special-mode or view-mode as appropriate
this means that the derived modes get all the standard keybinding in the standard way.
2016-09-13 09:32:31 -04:00
John Miller
40b34cd8b5 Close opened buffer from notebooklist buffer.
Do a better job with lexical-let's, add close command to opened notebook
list.
2016-09-04 17:58:55 -05:00
John Miller
afc6ca6102 More informative notebooklist buffer
It may be info overload, but notebooklist buffers will now list all
opened notebooks.
2016-08-31 10:04:06 -05:00
Guillaume Anciaux
62c0c21d28
cleaning some debug messages 2016-07-19 10:46:50 +02:00
Guillaume Anciaux
1c549e72d7
addîng the slide info in prompt and allow switch slide type with C-c C-d 2016-07-19 10:37:00 +02:00
John Miller
8aaae29a23 Fix what introducing kernelspecs broke.
Embarassing, really. Missing parameters and some poorly placed branching
logic conspired to bring down ein on IPython 2.x. Should be better now.
2016-04-15 16:08:53 -05:00
John Miller
bd9668702a Fix for issue #92
Use lexical-let vs let in `ein:notebooklist-render.`
2016-03-23 12:31:47 -05:00
John Miller
7e4df981c8 Fix for issue #91
Corrected `ein:junk-new` to include kernelspec selection.
2016-03-22 07:47:11 -05:00
John Miller
c5cf44a795 Fix saving new notebooks, whitespace updates.
Newly created notebooks no longer error on saving - bug in how
kernelspec metadata was being filled in.

Also a number of miscellaneous fixes to indentation that have
inexplicably appeared in the code.

Some small fixes for typos and catching up on version info.
2016-03-01 16:02:00 -06:00
John Miller
24afb15985 Bump to v0.8.0 2016-02-02 12:12:46 -06:00
John Miller
5dec56eec2 Respect kernelspec info in notebook metadata.
This should allow us to reload notebooks using the same
kernel they were running when saved.
2016-01-13 18:07:15 -06:00
John Miller
90920e28c6 Create notebooks with user-specified kernels.
This works with the New Notebook widget in the notebooklist,
need to check if the menu commands also work.
2016-01-13 08:30:15 -06:00