Without this workaround, I had three failed tests:
3 unexpected results:
FAILED ein:notebook-ask-before-kill-emacs-simple
FAILED ein:notebook-from-json-simple
FAILED ein:notebook-yank-cell-command-two-buffers
These tests failed because of the following same error:
(error "fun-var-sym=mumamo-eval-in-ein:notebook-bg-mode, use-major-entry=(ein:notebook-bg-mode (mumamo-eval-in-ein:notebook-bg-mode mumamo-def-eval-in-ein:notebook-bg-mode mumamo-kw-eval-in-ein:notebook-bg-mode))")
Also eintest:notebook-undo-after-split is fixed. Previous test
was actually wrong. Note that (ein:notebook-empty-undo-maybe)
is added to make the test pass for ein:notebook-enable-undo=yes.
The current behavior is what mentioned in ein:notebook-enable-undo.
fixes (part of) #37
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