Takafumi Arakaki
d25f6a1c02
Treat discarding case better in ein:notebook-ask-before-kill-buffer
...
Note that the test ein:notebook-to-json-after-closing-a-worksheet
fails now.
2012-08-30 02:34:25 +02:00
Takafumi Arakaki
2c8b8cce31
Add a failing test for notebook-to-json
2012-08-30 01:47:43 +02:00
Takafumi Arakaki
e32991a091
Merge branch 'worksheet-to-json-metadata'
...
Fixed: "metadata: null" was saved
2012-08-30 01:42:11 +02:00
Takafumi Arakaki
1674fcbc3e
Add test for ein:worksheet-to-json with metadata
2012-08-30 00:39:19 +02:00
Takafumi Arakaki
0bf9cce4b7
Fix ein:worksheet-to-json
...
When there is no metadata, do not include it in JSON data to avoid
converting nil to JSON (which yields null).
2012-08-30 00:36:44 +02:00
Takafumi Arakaki
f1f94d772d
Fix ein:testing-worksheet-to-json
...
The argument was not used.
2012-08-30 00:30:31 +02:00
Takafumi Arakaki
e34c6390e0
Include metadata in ein:worksheet-to-json
2012-08-29 21:34:18 +02:00
Takafumi Arakaki
1f301973c8
Set buffer in ein:worksheet-to-json
2012-08-29 21:32:06 +02:00
Takafumi Arakaki
795b27ddd8
Merge branch 'make-cells-in-worksheet-from-json'
...
* Cache cell instances instead of data sent from server.
This way, to-json works smoothly as I don't need to implement
plist to alist conversion.
* As a result, theoretically EIN can open notebook with multiple
worksheets now, although it can edit only the first worksheet.
* Worksheet buffer can be closed (provided it is not modified)
while notebook is still open.
2012-08-29 21:11:58 +02:00
Takafumi Arakaki
b56644d9b6
Include scratch sheet in ein:notebook-buffer
...
Now it is possible to have worksheet buffer closed but scratchsheet
buffer opened. In this case, ein:notebook-live-p should return t
and ein:notebook-buffer should return the scratchsheet buffer.
This is because notebook commands can such as save or rename can be
executed from the scratchsheet buffer.
ein:notebook-to-json-after-closing-a-worksheet is modified also
this test fails without the change in ein:notebook-buffer.
2012-08-29 21:04:24 +02:00
Takafumi Arakaki
271bb24b3e
Naming fix on ein:testing-notebook-close-scratchsheet-open-and-close
...
s/ws-list/ss-list/g
2012-08-29 21:04:23 +02:00
Takafumi Arakaki
135ab1969b
Fix failing tests for ein:notebook-close-worksheet
...
Actually the tests was wrong. But as it should work if I test it
against scratch sheet instead of worksheet, I modified it to do so.
2012-08-29 21:04:21 +02:00
Takafumi Arakaki
1f8f7dd8c8
Fix ein:notebook-close-worksheet
...
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).
2012-08-29 21:04:03 +02:00
Takafumi Arakaki
6c6fa65ec6
Add a failing test for ein:notebook-to-json
2012-08-29 21:03:27 +02:00
Takafumi Arakaki
b559cca042
Document `:saved-cells' slot
2012-08-29 21:03:18 +02:00
Takafumi Arakaki
5699ff84e1
Add tests for `:saved-cells' slot
2012-08-29 21:03:17 +02:00
Takafumi Arakaki
42b6363ca5
Support deactivated cell in ein:cell-get-text
...
This is needed for ein:cell-to-json to work with deactivated cell.
2012-08-29 21:03:14 +02:00
Takafumi Arakaki
95bd5aa950
Support saved-cells in ein:worksheet-get-cells
...
So ein:worksheet-to-json should work with worksheets without buffer.
2012-08-29 14:12:56 +02:00
Takafumi Arakaki
88f4e488f9
Set metadata in ein:worksheet-from-json
...
Note that metadata slow was not set elsewhere before.
2012-08-29 14:06:18 +02:00
Takafumi Arakaki
e03f8861b6
Make cells in ein:worksheet-from-json
...
This is needed to make ein:worksheet-to-json work with un-rendered
worksheets.
2012-08-29 14:05:17 +02:00
Takafumi Arakaki
fb0ea65943
Add a note on ein:notebook--worksheet-render
2012-08-28 22:42:14 +02:00
Takafumi Arakaki
6cbe7e24df
Merge branch 'remove-notebook-slot-from-worksheet'
...
Complex backward dependency on notebook module in worksheet module
is removed. ein:worksheet class depends on ein:notebook through
simple callbacks.
* There is no object holding notification instance in a slot.
Worksheet is loosely coupled with notification via buffer
and events handler.
* ein:notebook-discard-output-on-save is obsolete now.
2012-08-28 22:03:39 +02:00
Takafumi Arakaki
e3f15e649c
Simplify notification module setup
2012-08-28 21:48:06 +02:00
Takafumi Arakaki
3d76a1a225
Remove notification slot from ein: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.
2012-08-28 21:43:57 +02:00
Takafumi Arakaki
cf30b4f74e
Make ein:notebook-discard-output-on-save obsolete
2012-08-28 21:17:49 +02:00
Takafumi Arakaki
cbe1ab3904
Add discard-output-p slot in ein:worksheet
2012-08-28 20:51:18 +02:00
Takafumi Arakaki
848771a724
Remove two more notebook functions from ein-notebook.el
2012-08-28 18:12:51 +02:00
Takafumi Arakaki
7f0f5ea382
Remove ein:$notebook-url-or-port from ein-worksheet.el
2012-08-28 18:03:41 +02:00
Takafumi Arakaki
e93801f101
Add get-notebook-name slot in ein:worksheet
2012-08-28 18:00:32 +02:00
Takafumi Arakaki
1bf5bfd0da
Set nbformat in scratchsheet also
2012-08-28 18:00:31 +02:00
Takafumi Arakaki
380d5504f1
Add nbformat slot in ein:worksheet
...
So that I can remove the line:
(declare-function ein:$notebook-nbformat "ein-notebook")
2012-08-28 18:00:29 +02:00
Takafumi Arakaki
6f7a29fb2f
Add notes on Event vs hook vs callback
2012-08-28 17:18:39 +02:00
Takafumi Arakaki
8ac7c83ebc
Fix compile warning in ein-kernelinfo.el
2012-08-28 17:15:03 +02:00
Takafumi Arakaki
82ef2fb6be
Merge branch 'worksheet-enable-undo'
...
Rename ein:notebook-enable-undo to ein:worksheet-enable-undo as
worksheet module handles buffer and thus undo now.
2012-08-28 17:04:44 +02:00
Takafumi Arakaki
c7f604fcf9
Fix obsolete warning in test-ein-notebook.el
2012-08-28 16:44:08 +02:00
Takafumi Arakaki
1f7e6ec857
s/\(maybe_reset_undo\).Notebook/\1.Worksheet/g
2012-08-28 16:42:07 +02:00
Takafumi Arakaki
8ffc065a5a
Move maybe_reset_undo event to worksheet
2012-08-28 16:39:32 +02:00
Takafumi Arakaki
23c75f5a2b
Add FIXME on ein:notebook-discard-output-on-save
2012-08-28 16:32:39 +02:00
Takafumi Arakaki
03d7c82cb8
Update document
2012-08-28 16:32:15 +02:00
Takafumi Arakaki
5e22f31dfe
ein:notebook-enable-undo -> ein:worksheet-enable-undo
2012-08-28 16:28:14 +02:00
Takafumi Arakaki
6189c8e250
Document ein:source-dir
2012-08-28 16:06:38 +02:00
Takafumi Arakaki
5d9d37a8de
Fix compile warnings in test-ein-notebook.el
2012-08-28 15:54:04 +02:00
Takafumi Arakaki
1ba8f46b3a
Fix compile warning in ein-testing-kernel.el
2012-08-28 15:50:58 +02:00
Takafumi Arakaki
6e1d9084e6
Merge branch 'ein-core'
...
EIN specific variables and functions are moved to ein-core.el
from ein-utils.el
2012-08-28 15:48:43 +02:00
Takafumi Arakaki
e70d3da4ab
Move tests to test-ein-core.el from test-ein-utils.el
2012-08-28 15:38:09 +02:00
Takafumi Arakaki
bf9d4f7b5d
Move EIN specific stuff to ein-core from ein-utils
2012-08-28 15:36:15 +02:00
Takafumi Arakaki
ca8c1678fe
(require 'ein-utils) -> (require 'ein-core)
2012-08-28 15:26:32 +02:00
Takafumi Arakaki
338ff5267f
Add ein-core.el
2012-08-28 15:26:02 +02:00
Takafumi Arakaki
7dff9d7f6a
Add FIXMEs on ein:$kernel
2012-08-28 15:06:28 +02:00
Takafumi Arakaki
4a1b812e21
Define "public" method ein:kernel-url-or-port
2012-08-28 14:55:22 +02:00