Previous tests were failed because undo was not reset after the
execution callbacks modified the buffer. This is fixed by calling
ein:notebook-empty-undo-maybe via event in all the callbacks.
Previous change was not complete since the test does NOT fail.
The test must fail because the test was for `full' undo but
actually it was tested against normal undo.
It turned out let binding of buffer-undo-list in ein-cell.el
was the right way to do it, since EWOC does some buffer
modification outside of the pretty printer. Therefore, setting
inhibit-read-only and buffer-undo-list in the pretty printer
makes no sense. Thus, they are removed from ein:notebook-pp.
This means that wrapping EWOC functions with let binding of
buffer-undo-list is essential. Meaning that what I wrote in
the FIXME ein:notebook-pp was wrong. Therefore,
ein:notebook-empty-undo-maybe cannot be called in ein:notebook-pp
and ein:notebook-empty-undo-maybe must be called in every single
functions that modifies buffer via EWOC.
Tests for three cases of undo configuration are added.
These test still fail:
ein:notebook-undo-after-execution-1-cell/yes
ein:notebook-undo-after-execution-2-cells/yes
As it seems that some smartrep keybinds does not work properly in
MuMaMo-enabled buffer, this change provides some shortcuts for these
keybinds.
I sent a pull request to smartrep.el regarding this issue:
myuhe/smartrep.el#7
There should be no functional change by this change.
This makes it easier to change the keymap while running EIN.
I can just evaluate the let clause. In the previous version,
I couldn't do that because rebinding the keymap does not alter the
keymap used in the running mode.
It was needed to answer `y' when killing Emacs and there exists
unsaved buffers. This change eliminate the need for that by killing
buffers forcefully.
This change fix this error:
Got error from the on-message function: Unbound slot: "#<class ein:codecell>", "#<ein:codecell Cell>", :events, oref
This error was issued when executing yanked cell because the :events
slot of the yanked cell was empty.
As this command requires to invoke multi-line python code, ein.py is
added to store python code needed for EIN. The sys.path is added
automatically when the kernel is started so that any function can be
called as ``__import__("ein").FUNCTION()``. This way, namespace is
not contaminated at all.
Another possible way to implement this is to use user_expressions.
However, replied message is Python's repr. As there is no reliable
way to convert it except using Python itself, I am using stream to
get CWD.
This solves the problem due to the url-retrieve gotcha.
Main changes:
* Separation of the function to parse buffer and callback.
This is good because parsed data can be used from multiple
callbacks (SUCCESS and STATUS-CODE).
* As a result, current buffer for callbacks is not process
buffer anymore. Callbacks should not assume any particular
current buffer.
* RESPONSE-STATUS is added to the arguments for callbacks
to pass around the value of url-http-response-status.
Previous attempts:
* cb5f53c183:
Simpler and better fix than the previous one
* fff269fc39:
ein:notebooklist-delete-notebook works again
This change adds timeout to notebook-save-notebook. This is useful
since sometimes Emacs does not start transaction and have opened
process hanging around.
This change also fixes a bug which might be occurred in the previous
version: ein:notebook-discard-output-p is called from
ein:notebook-save-notebook via ein:notebook-to-json but not on the
notebook buffer. This function access to the buffer, but not treated
properly. This change fixes this problem.