Commit graph

369 commits

Author SHA1 Message Date
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
Takafumi Arakaki
0d86295cf4 Set delete slot in ein:notification-setup 2012-10-09 23:25:34 +02:00
Takafumi Arakaki
03a8b008d3 Refactor ein:notebook-worksheet-delete 2012-10-09 23:23:03 +02:00
Takafumi Arakaki
2ce2558b12 Add get-buffer slot in ein:notification-tab 2012-10-09 22:56:17 +02:00
Takafumi Arakaki
77aaa521b7 Refactor ein:notebook-worksheet--open-new 2012-10-09 22:52:40 +02:00
Takafumi Arakaki
19b76d0bb5 Fix ein:notebook-worksheet-open-ith message 2012-10-09 22:48:14 +02:00
Takafumi Arakaki
04a09a522f Add an option ein:notebook-set-buffer-file-name 2012-10-09 15:43:15 +02:00
Takafumi Arakaki
6b1997c111 Add ein:notebook-fetch-data 2012-10-09 15:30:44 +02:00
Takafumi Arakaki
a1ebcbb1a5 Add ein:worksheet-dedent-cell-text in menu 2012-10-09 14:04:37 +02:00
Takafumi Arakaki
83b80a26fa Update ein:notebook-modes 2012-09-30 20:40:22 +02:00
Takafumi Arakaki
b01dd3250e Renae ein:notebook-org-src-mode to ein:notebook-multilang-mode 2012-09-30 20:24:09 +02:00
Takafumi Arakaki
cce7480770 Add PREDICATE argument to ein:notebook-opened-* 2012-09-23 15:26:57 +02:00
Takafumi Arakaki
18dec8a1cb Cleanup FIXMEs 2012-09-11 01:47:50 +02:00
Takafumi Arakaki
32f93d2b9f Reduce code for messaging for notebook-open 2012-09-07 00:01:27 +02:00
Takafumi Arakaki
c854fa1022 Add config: ein:helm-kernel-history-search-key 2012-09-05 23:27:17 +02:00
Takafumi Arakaki
81a1b64fb0 Add an example setting in ein:notebook-modes 2012-09-04 22:12:13 +02:00
Takafumi Arakaki
b6e3c8df26 Change default ein:notebook-modes
Docstring is slightly improved.
2012-09-04 22:09:20 +02:00
Takafumi Arakaki
b50bc20b00 Automatically load ein-org-src 2012-09-04 17:10:59 +02:00
Takafumi Arakaki
08ea5e7abb Get rid of repeated set-keymap-parent
ein:notebook-minor-mode is added to do that.
2012-09-04 17:01:54 +02:00
Takafumi Arakaki
05f7b4666c Call ein:worksheet-imenu-setup from ein:notebook-mode-hook 2012-09-04 16:54:56 +02:00
Takafumi Arakaki
a43af7e9d2 Add ein:notebook-mode-hook 2012-09-04 16:51:37 +02:00
Takafumi Arakaki
b088f7997c ein:notebook-close available as a command 2012-09-02 06:59:36 +02:00