Commit graph

340 commits

Author SHA1 Message Date
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
71ee42a803 Load secure cookies when using secure connection.
Secure connections (i.e. wss, https) store cookies in a secure jar,
websocket connections now take this into account when connecting
using wss protocol.
2016-04-08 21:22:14 -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
a752e45772 Undo buffer-file-name madness.
No longer set buffer-file-name for ein:notebook buffers. This was
causing unexpected and potentially disastrous (as in data corruption)
behavior.

Some updates to travis configuration and testing. Still a long ways
from having that working, though.
2016-03-03 08:31:05 -06: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
6facffd586 Be even more respectful of kernelspec data. 2016-01-13 18:24:59 -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
a89aa6aebd Including kernelspecs into the notebooklist view.
EIN now shows kernels available for the Jupyter server being view in the
notebooklist buffer. We don't do much with the info, yet, though.
2016-01-13 07:52:02 -06:00
John Miller
25d1437de6 Ask for kernel when creating named notebook.
We don't do anything with the info, yet, but it is a good
test for our code for getting available kernels from the Jupyter
server.
2016-01-11 20:21:19 -07:00
John Miller
4f382f7312 Merge branch 'master' into kernelspecs 2016-01-11 15:40:08 -07:00
John Miller
1987f601c7 Fix event firing for content save errors.
Code wasn't calling `ein:notebook-save-notebook-error` when content
saving failed. Small detail, but would result in "Notebook saving"
eternally hanging out in notebook message display.
2016-01-11 15:11:14 -07:00
John Miller
447854fdac Query Jupyter for kernelspecs
Structures and logic for querying Jupyter server for a list of available
kernelspecs.
2016-01-11 09:20:40 -07:00
John Miller
a4ab2a52f5 Simplifying and fixing code for saving notebooks
Code for generating v4 notebook json much cleaner and easier to
understand. As added bonus have fix for saving images.
2015-12-22 12:32:21 -06:00
John Miller
b8aa391b31 Fix ein:make-content-hierarchy.
In the end so ein:notebooklist-open-notebook-global can work.
2015-12-04 14:15:41 -06:00
John Miller
488bb67f09 Add kernel reconnect command, fix restart.
New commend `ein:notebook-reconnect-kernel` which will close then reopen
the websocket connection to a running kernel - without killing the
kernel.

Was not correctly killing and restarting the kernel in
`ein:kernel-restart.`

Fixed `ein-restart-kernel` to use REST API to kill kernel, then
restart/reconnect, again using the REST API.

Got rid of the `ein:kernel-stop` function. Seems confusing to have
'stop' and 'kill' methods running around.
2015-07-05 22:27:52 -05:00
John Miller
68dcef083f Deprecate ein:notebook-set-buffer-file-name, update docs. 2015-05-16 07:46:47 -05:00
John Miller
a4c6892551 Support set-buffer-file-name
In support of fixing issues #46 and #47.
2015-05-15 23:23:56 -05:00
John Miller
8e72876ae8 Fix for worksheet tag, clean up some comments. 2015-05-15 18:28:13 -05:00
John Miller
5886498684 Add worksheet tags to nbformat 4 notebooks
NBformat 4 has a tag key in the cell metadata. We use it to tag a cell
depending on which worksheet it is in. For now the code does nothing
else with this tag, but the goal is to reimplement multiple worksheets
in ein.
2015-05-14 09:39:47 -05:00
John Miller
fe4950cbb7 Correctly start sessions in ipython 3.x
Now start sessions correctly (I think) in IPython 3.x, but somehow this
seems to break IPython 2.x.
2015-05-04 22:59:18 -05:00
John Miller
2eeae04a03 Fix issue #35
Get ein:junk-new working again under IPython 2.x.

Some non-related work on fixing `ein:pytools-export-buffer`. Not quite
there yet, but I have an idea of what is going on.
2015-03-25 09:52:16 -05:00
John Miller
9774ab910f Fixing misnamed variable. 2015-02-16 21:54:21 -06:00
John Miller
c1ce100f31 Renaming notebooks works again in IPython 2.x
As an added bonus you should be able to move notebooks to different
directories in the notebook hierarchy. Not tested, though, so I'm not
sure how well that works.
2015-02-16 21:14:47 -06:00
John Miller
ff415f3ebc Unbreaking ein:notebook-rename-command 2015-02-16 13:06:35 -06:00
John Miller
098dddd3e9 Regain IPython 2.x compatibility I
Notebooks now save in IPython 2.x and 3.x.
2015-02-12 08:45:29 -06: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
84f478aed6 Improving ipython 3 support in testein.py. Lots of fixes for notebook tests to
properly test nbformat 3 notebooks.
2015-02-02 13:20:24 -06:00
John Miller
9637ea7317 Fix null metadata
ein was incorrectly writing empty metadata as a Null object, which was
causing errors in ipython.

Added a helper function to write json encoding of a notebook to a
temporary buffer to help debug code for encoding nbformat4 json from
cell data.
2015-01-09 10:00:22 -06:00
John Miller
5b84bf8874 Fix extraneous notebok-path argument
Had two arguments for notebook-path in various function signatures.
2014-12-04 12:01:33 -06:00
John Miller
9182acc258 NBFormat v4 Tweaks, fixing rename-notebook
Renaming notebooks should work a bit better now, tweaked code for saving
nbformat v4 to correctly include execution_count parameter even if cell
has not been executed.

Cleaned up some silliness in ein:query-singleton-ajax.
2014-11-11 11:33:14 -06:00
John Miller
5112873f7c Bug in saved v4 notebook format
Wasn't generating correct format for output elements in code_cells.
2014-11-10 09:36:44 -06:00
John Miller
849adda708 Support for nbformat v4
BEWARE! This is a large commit and the code here is still mostly
untested. Back up your notebooks before giving this changeset a try with
the current IPython-dev version.

Given that, ein is now able to open and save basic notebooks saved in
nbformat 4. Still haven't tested more complex notebooks with embedded
images.
2014-11-07 19:28:09 -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
John Miller
9a5cc12975 Renaming Notebooks
Renaming notebooks is functional, apparently, but code needs more
testing. I am concerned that the PATCH request is not generating a 200
response code as it should be (and does when I test under Python).

Also some preliminary code to provide breadcrumbs in notebooklist
buffer.
2014-09-28 13:52:30 -05:00
John Miller
b9e145c4db Cleaning up status messages
Corrected error in response code checking when saving a network (IPython
server now returns 200 instead of 204).

Cleaned up error that was being raised from EIN's notification system.
Seems like there is some logic for popping to a buffer once a
notification event first, but to what buffer is unclear so for know I
have disabled that functionality.
2014-09-12 12:37:24 -05:00
John Miller
66a035cfe5 Bug in saving notebooks
Fixed a bug in saving notebooks in a subdirectory - EIN thought the save
was failing and incorrectly creating a new workbook at the top of the
directory hierarchy.
2014-09-12 09:20:55 -05:00
John Miller
1956876200 Support Directories
Increased support for IPEP 16: Notebook multi-directory dashboard and
URL mapping. The ein:notebooklist buffer will show subdirectories, which
can be opened by user. Does not support going back up in the hierarchy,
however.

Not fully tested, so use with caution!
2014-09-11 20:04:00 -05:00
John Miller
20a725012b Preliminary support for IPython 2.0
Basic, mostly untested support for the brave new world of IPython 2.0.
2.0 now supports the concepts of 'paths', letting notebooks be stored in
a directory hierarchy. This has resulted in a change in the web API -
most URL's are now prefixed with 'api/'.

EIN does not (yet) support hierarchical notebooks, but at least it now
plays better with the new URL scheme for iPython 2.0.

Oh, there also seems to have been a change in the format of the ipython
notebook. This has been fixed too, but is probably bakcwards
incompatible.
2014-04-14 12:48:55 -05:00
Takafumi Arakaki
203ff99987 Register ein:worksheet-execute-all-cell to menu
Add it to document also.

fixes #63
2013-04-12 18:24:38 +02:00
Takafumi Arakaki
8a1eef9e6a Fix ein:notebook-save-notebook: remove ":cache nil" 2012-12-29 19:48:05 +01:00
Takafumi Arakaki
191a8f0022 Cosmetic changes
The changes I deferred in the previous commits to make the
diff small.
2012-12-29 18:55:06 +01:00
Takafumi Arakaki
5b5aa30752 Use keyword arguments of CB supported by request.el 2012-12-29 18:55:06 +01:00
Takafumi Arakaki
fdb80c9962 Rewrite callbacks: replace cons with apply-partially 2012-12-29 18:55:06 +01:00
Takafumi Arakaki
5da4a9eb5b Add ein:notebook-worksheet-index 2012-10-15 21:05:59 +02:00
Takafumi Arakaki
76d2336f8c Make ":" invalid as a notebook name
The JS client code was changed in this PR:
https://github.com/ipython/ipython/pull/1815
(commit: e264b9b48b)
2012-10-15 18:39:50 +02:00
Takafumi Arakaki
960fddf330 S- left/right click to move worksheet (tab) 2012-10-10 00:06:54 +02:00
Takafumi Arakaki
a8aecc52d7 Add insert-next/prev slots to ein:notification-tab 2012-10-09 23:51:12 +02:00
Takafumi Arakaki
f1efb252a3 Refactor ein:notebook-worksheet-insert-next/prev 2012-10-09 23:45:27 +02:00
Takafumi Arakaki
cc0f96e6e9 Refactor ein:notification-setup 2012-10-09 23:35:36 +02:00