Takafumi Arakaki
41baba4410
Add ein:connect-request-tool-tip-or-help-command
2012-05-23 11:06:54 +02:00
Takafumi Arakaki
7a2f998195
Add a FIXME comment on ein-connect.el
2012-05-23 11:04:22 +02:00
Takafumi Arakaki
260b2d8e7d
Add ein:notebook-opened-buffers
...
Put shared logic together.
2012-05-23 10:48:43 +02:00
Takafumi Arakaki
7a331b6895
Remove unnecessary line from ein:notebook-open
...
Don't need to remove key from the map here, since it will be
added (overwritten) later by ein:notebook-url-retrieve-callback.
2012-05-23 10:47:43 +02:00
Takafumi Arakaki
e1822283ac
Add ein-connect.el
2012-05-23 04:23:17 +02:00
Takafumi Arakaki
146aac147f
Better emacs-lisp type output handling
2012-05-23 03:19:22 +02:00
Takafumi Arakaki
806d10ae06
Pass the test ein:notebook-request-help
2012-05-23 02:43:44 +02:00
Takafumi Arakaki
c42b756065
Fix ein:pager--open-with-text
...
Arguments for plist-get were flipped.
The previously added and failed test
ein:notebook-execute-current-cell-question is passed now.
2012-05-23 02:31:01 +02:00
Takafumi Arakaki
7ca440ab75
Merge branch 'master' into refactor-kernel
2012-05-23 02:26:05 +02:00
Takafumi Arakaki
d2801ebcfc
Add test: ein:notebook-execute-current-cell-question
2012-05-23 02:21:45 +02:00
Takafumi Arakaki
4cbd11ebaa
Merge branch 'master' into refactor-kernel
2012-05-23 02:10:14 +02:00
Takafumi Arakaki
d538d7673e
Add new test: ein:notebook-request-help
2012-05-23 02:03:23 +02:00
Takafumi Arakaki
3985f97eb8
Change the spec of callbacks: msg-type is str now
...
Test ein:notebook-execute-current-cell is passed.
At this point all unit tests in test/test-ein-*.el are passed.
msg-type was first a string and I changed it to a keyword when I am
writing ein:kernel-execute. But as I need to fix a lot of other
places, I change it back to a string. Note that msg-type can come
from JSON directly when the notebook is first opened, so it must be
consistent with that routines.
Maybe I will change it again, but at that time, symbol is better than
keyword because msg-type is a value rather than a key.
2012-05-23 01:40:00 +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
7e7d81c638
Fix ein:kernel-get-callbacks-for-msg
...
The order of arguments was wrong.
2012-05-23 01:13:10 +02:00
Takafumi Arakaki
2847424fcc
Fix ein:notebook-cell-from-type
...
TYPE is a symbol, not a string.
2012-05-23 01:12:12 +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
7fede75855
Fix ein:codecell: add kernel slot
2012-05-22 23:53:25 +02:00
Takafumi Arakaki
1c1135685b
Fix ein:notebook-new: remove msg-cell-map
2012-05-22 23:51:04 +02:00
Takafumi Arakaki
6a7b0497b0
Simplify mocking for test-ein-kernel.el
2012-05-22 23:45:53 +02:00
Takafumi Arakaki
085fd73823
Fix test-ein-kernel.el: these tests are passed
2012-05-22 23:32:47 +02:00
Takafumi Arakaki
18c7c027ff
Fix the event from ein:kernel-restart
2012-05-22 23:30:18 +02:00
Takafumi Arakaki
15a3f31412
Ensure that event hooks are called in notebook buffer
2012-05-22 23:03:21 +02:00
Takafumi Arakaki
83d7e15b04
Use updated execute functions in notebook
2012-05-22 22:38:39 +02:00
Takafumi Arakaki
7c4d628253
Setup event handler for kernel in notebook
2012-05-22 22:34:00 +02:00
Takafumi Arakaki
ce01997a1e
Setup kernel for code cells
2012-05-22 22:32:49 +02:00
Takafumi Arakaki
1fc79a506e
Fix ein:cell-execute: input text was not fetched
2012-05-22 22:30:34 +02:00
Takafumi Arakaki
d9bd79102b
Allow empty CALLBACKS for ein:kernel-execute
2012-05-22 22:28:32 +02:00
Takafumi Arakaki
7ad7fa09f3
Remove ein:notebook-handle-shell-reply
...
Its code is moved to ein:notebook-complete-cell and
ein:notebook-request-tool-tip
2012-05-22 22:03:06 +02:00
Takafumi Arakaki
ff78d154f2
Remove ein:notebook-handle-payload
...
Its code is moved to ein:notebook--set-next-input and
ein:pager--open-with-text.
2012-05-22 21:42:30 +02:00
Takafumi Arakaki
b59a187c3e
Remove useless ein:notebook-handle-iopub-reply
...
Its code is already moved to ein:cell--handle-clear-output and
ein:kernel--handle-iopub-reply.
2012-05-22 21:39:36 +02:00
Takafumi Arakaki
fcdd58343b
Move cell-kernel interaction to ein-cell.el
2012-05-22 21:31:23 +02:00
Takafumi Arakaki
1cf85eb747
Cosmetic change on ein:kernel-execute's document
2012-05-22 21:24:11 +02:00
Takafumi Arakaki
cfa1e6cfe3
Document ein:kernel-execute more
2012-05-22 21:22:53 +02:00
Takafumi Arakaki
72b2adca4d
Adapt notebook to the changes in kernel (WIP)
2012-05-22 20:50:47 +02:00
Takafumi Arakaki
0faf8bd316
Add ein:pager-bind-events
2012-05-22 20:15:12 +02:00
Takafumi Arakaki
b09a8a1eb0
Add ein:events-on to set event hook
2012-05-22 20:01:14 +02:00
Takafumi Arakaki
bd6a8db46d
Fix compile error of ein-kernel.el
...
This happens because after-change-major-mode-hook is called while
compiling. Use ein:eval-if-bound instead of directly referencing.
2012-05-22 19:37:35 +02:00
Takafumi Arakaki
db6f7983eb
Start refactoring kernel module
...
Change is only in ein-kernels.el except the new one function
in ein-utils.el. Note that byte compile and tests are broken
because of the changes.
Changes are mostly following the refactoring in IPython JS client:
https://github.com/ipython/ipython/pull/1711
2012-05-22 19:35:05 +02:00
Takafumi Arakaki
866f2ccafd
Merge branch 'refactor-events'
2012-05-22 14:39:50 +02:00
Takafumi Arakaki
d8dd8dd3a7
Use cons for the EVENT-TYPE instead of a symbol
...
This simplifies case matching.
2012-05-22 14:30:23 +02:00
Takafumi Arakaki
b66832ca58
Encapsulate event handling in a class
...
Various `ein:events-*' function was seeing buffer local variables
which causes the problem when triggering events from non-notebook
buffer. To fix that problem, and prepare for the future change
which may increase event channels, the status variable used for
header line is encapsulated in a class.
2012-05-22 14:20:08 +02:00
Takafumi Arakaki
36f5d1059f
Make ein:mumamo-*cell-mode customizeable
2012-05-22 04:20:39 +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
85c90fc6c6
Fix ein:notebook-handle-shell-reply
...
This fix is as same as the previous commit:
`msg_type' was fetched from top level reply object where it should be
fetched from `header'.
2012-05-22 02:54:14 +02:00
Takafumi Arakaki
a02a4a4221
Fix ein:notebook-handle-iopub-reply
...
`msg_type' was fetched from top level reply object where it should be
fetched from `header'.
2012-05-22 02:49:44 +02:00
Takafumi Arakaki
5595d8188f
Treat dead kernel status better
2012-05-22 01:37:46 +02:00
Takafumi Arakaki
34745e740b
Add keybind: C-c C-r restarts kernel
2012-05-22 01:09:33 +02:00
Takafumi Arakaki
95743a12c8
Explain how to use elisp type output in README
2012-05-22 01:00:34 +02:00
Takafumi Arakaki
e3b9f9842e
Don't execute elisp output when opening notebook
...
This means that Emacs lisp type output is treated as same as like
Javascript output in browsers.
2012-05-22 00:40:07 +02:00