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.