Saving in a cell editing buffer now actually causes the cell in the worksheet to
be dynamically updated (oh how we have waited for this moment).
Try to get cell undo actions to be less likely to trigger an error.
tkf/emacs-request#60 was recently fixed, so no longer need to defadvice
`request--netscape-cookie-parse. Changed names of some obsolete variables. Also
trying to be a bit more clever in error handling by judicious use of
condition-case.
Some cell actions now have a true undo. Moving, inserting and executing cells
can all be undone. Deleting cell does not have an undo at the moment, though the
preferred method for users is to call ein:worksheet-kill-cell which puts the
removed cell into the kill-ring.
Using C-c', users can create a temporary buffer running an appropriate
mode to edit the contents of a notebook cell. This functionality is
intentionally very similar to what org-mode provides for editing blocks
of code or other.
The goal is to eventually eliminate most of the warnings that are
generated when byte-compiling ein.
Do this over several commits to make it easier to revert in the likely
event that something breaks.
Let the user control whether or not to view slide attributes in current
worksheet via `ein:worksheet-toggle-slideshow-view` (C-c S).
Also added a couple more slide attributes (fragment, notes) as
these appear to be support in current Jupyter version.
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.
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.
What ein:notebook-close-worksheet did was horribly wrong.
It deleted a worksheet. Instead, now it properly close worksheet.
The failing test added in the previous commit passes now
(ein:notebook-to-json-after-closing-a-worksheet).
What notification module needs to know is its buffer and the events
handler. So there is no reason to keep it in the worksheet slot.
Besides, setting header-line-format before calling notebook-mode
is not good because setting major mode discards header-line-format.
So, notification is setup in notebook module now.