Commit graph

113 commits

Author SHA1 Message Date
Takafumi Arakaki
d4d1b0c9aa Fix ein:notebook-merge-cell-command undo spec
Follow the specification written in ein:notebook-enable-undo.
2012-08-01 23:04:48 +02:00
Takafumi Arakaki
22848bdd91 Use the output area of the bottom cell when merge
fixes #37
2012-08-01 23:02:17 +02:00
Takafumi Arakaki
b3050b27ef Preserve output of the bottom cell when splitting
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
2012-08-01 22:44:00 +02:00
Takafumi Arakaki
c1b0eab11d Document eintest:notebook-split-cell-at-point 2012-08-01 22:02:37 +02:00
Takafumi Arakaki
13e9e7f29b Add a test ein:notebook-change-cell-type-cycle-through 2012-07-21 15:02:07 +02:00
Takafumi Arakaki
0e910b46fd Fix test: ein:notebook-toggle-cell-type-simple 2012-07-21 14:41:09 +02:00
Takafumi Arakaki
c104a0b19d Rename ein:kernel-ready-p to ein:kernel-live-p 2012-07-19 00:37:30 +02:00
Takafumi Arakaki
7d81026f2c Fix ein:notebook-merge-cell-command
Let binding of buffer-undo-list of shadowed the global variable.
2012-06-17 09:50:45 +02:00
Takafumi Arakaki
fb4ed0b449 Add more tests for undo 2012-06-17 08:59:04 +02:00
Takafumi Arakaki
6b5b54c965 Trigger ein:notebook-empty-undo-maybe via event
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.
2012-06-16 23:42:58 +02:00
Takafumi Arakaki
0c13bc4234 Modifying undo in PP is wrong
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
2012-06-16 23:42:23 +02:00
Takafumi Arakaki
5b06f8fcd8 More precise check in undo tests 2012-06-16 21:04:47 +02:00
Takafumi Arakaki
7bf8acd484 Rename to ein:notebook-undo-after-execution-1-cell 2012-06-16 20:42:14 +02:00
Takafumi Arakaki
4f3695c4cf Refactor ein:notebook-undo-after-execution*
.. and ein:notebook-execute-current-cell.
2012-06-16 20:41:27 +02:00
Takafumi Arakaki
1127de66a7 Add two tests for undo in notebook 2012-06-16 20:12:56 +02:00
Takafumi Arakaki
35c3e9bd7b Fix ein:notebook-execute-current-cell
"Hellow World" for eintest:kernel-fake-stream had unnecessary single
quotes.
2012-06-16 19:00:44 +02:00
Takafumi Arakaki
c0839fa795 Refactor ein:notebook-execute-current-cell more (2) 2012-06-16 18:58:27 +02:00
Takafumi Arakaki
74a433dd7b Refactor ein:notebook-execute-current-cell more 2012-06-16 18:51:56 +02:00
Takafumi Arakaki
6aef0678f1 Refactor ein:notebook-execute-current-cell 2012-06-16 18:45:01 +02:00
Takafumi Arakaki
05b699e50e Improve test ein:notebook-yank-cell-command-simple 2012-06-06 02:03:14 +02:00
Takafumi Arakaki
e9210fe644 Cosmetic changes on code alignment 2012-06-04 16:23:53 +02:00
Takafumi Arakaki
93199a392b Remove cell from kernel-execute callbacks 2012-06-04 16:18:17 +02:00
Takafumi Arakaki
be0c3665b9 Fix ein:notebook-toggle-cell-type: set kernel
Set kernel slot if the converted cell is a code cell.
2012-06-02 21:47:03 +02:00
Takafumi Arakaki
77d574dc73 Fix test: ein:notebook-toggle-cell-type-simple 2012-06-02 20:59:14 +02:00
Takafumi Arakaki
fffeeb2d3b Clean up eintest:notebook-from-json 2012-05-26 20:51:18 +02:00
Takafumi Arakaki
053962a5bf Fix eintest:notebook-from-json 2012-05-26 20:49:31 +02:00
Takafumi Arakaki
e5a4e8a229 Allow no undo after deleting a cell 2012-05-25 17:57:52 +02:00
Takafumi Arakaki
98ae4efbb9 Fix compile error of test-ein-notebook.el 2012-05-25 17:40:29 +02:00
Takafumi Arakaki
315b106c96 Start using notification widget 2012-05-25 02:04:07 +02:00
Takafumi Arakaki
160f15becd Fix: copied cell can't be executed 2012-05-23 18:46:09 +02:00
Takafumi Arakaki
294eded27e Add tests for the previous fix 2012-05-23 15:53:10 +02:00
Takafumi Arakaki
676e4ff523 Fix test ein:notebook-execute-current-cell
Many old functions are updated.
2012-05-23 01:15:42 +02:00
Takafumi Arakaki
46af87db27 Setup dummy kernel and events for notebook tests
This fixes a lot of tests (but not all).
2012-05-23 00:00:33 +02:00
Takafumi Arakaki
c245491c50 Correct kernel test to follow the previous fixes
msg_type in the "fake packet" is moved into the header sub-object.

Related previous fixes:
* 85c90fc6c6 -- fix shell-reply
* a02a4a4221 -- fix iopub-reply
2012-05-22 04:20:35 +02:00
Takafumi Arakaki
4da77fd286 Separate test-ein-notebook.el in sections 2012-05-20 16:30:33 +02:00
Takafumi Arakaki
3514a1def5 Add test and fix ein:notebook-ask-before-kill-emacs
Two bugs are fixed.  One is in notebook-ask-before-kill-emacs and the
other is in ein:notebook-modified-p.
2012-05-20 03:19:55 +02:00
Takafumi Arakaki
b7efef9bfd Fix failing tests
* test-ein-cell.el was not changed in 10fb29f when the cell types are
  changed.
* test-ein-notebook.el was not changed in b9b5dc5 when the destructor
  was introduced.
2012-05-20 00:41:16 +02:00
Takafumi Arakaki
8ecd3100c4 Add tests for ein:notebook-merge-cell-command 2012-05-19 13:48:27 +02:00
Takafumi Arakaki
cb1eab8d80 Add new function ein:cell-location and its tests 2012-05-19 13:10:44 +02:00
Takafumi Arakaki
218a2e28ed Fix a bug and add more tests for cell splitting 2012-05-19 04:19:17 +02:00
Takafumi Arakaki
6bc632b574 Trim newlines in ein:notebook-split-cell-at-point 2012-05-19 03:56:43 +02:00
Takafumi Arakaki
49545be8bd Make goto-next/prev-cell behave more intuitively 2012-05-18 02:59:00 +02:00
Takafumi Arakaki
a562c7a19d Add ein:notebook-move-cell-up/down-command 2012-05-18 01:38:59 +02:00
Takafumi Arakaki
6ab4d4860a Add test: ein:notebook-execute-current-cell
mocker.el is added to write this test.
2012-05-17 18:41:28 +02:00
Takafumi Arakaki
cbbd118236 Add ein:notebook-split-cell-at-point command 2012-05-17 15:48:21 +02:00
Takafumi Arakaki
542bc5590c Improve ein:notebook-toggle-cell-type-simple 2012-05-17 14:40:17 +02:00
Takafumi Arakaki
17a6a383e2 Fix ein:notebook-console-security-dir-get 2012-05-16 19:15:48 +02:00
Takafumi Arakaki
e1fd1a1364 Add test and fix inter-buffer yanking 2012-05-16 12:58:59 +02:00
Takafumi Arakaki
b7c5dd4996 Add test: ein:notebook-goto-prev-cell-simple 2012-05-16 12:35:30 +02:00
Takafumi Arakaki
43e33dc947 Add test: ein:notebook-goto-next-cell-simple 2012-05-16 12:32:39 +02:00