Commit graph

351 commits

Author SHA1 Message Date
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
Takafumi Arakaki
654f68701a Document ein:notebook-modes 2012-05-21 19:47:38 +02:00
Takafumi Arakaki
e0dbe4bd47 Add ein:dev-notebook-python-mode 2012-05-21 18:07:52 +02:00
Takafumi Arakaki
7654a03582 Add ein:notebook-python-mode 2012-05-21 18:05:57 +02:00
Takafumi Arakaki
1ffa6807dc Fix docstring of ein:notebook-plain-mode 2012-05-21 18:01:03 +02:00
Takafumi Arakaki
7b40ae11af Make ein:notebook-modes customizable 2012-05-21 17:55:23 +02:00
Takafumi Arakaki
6a6e5b953f Merge branch 'face-input' 2012-05-21 16:36:43 +02:00
Takafumi Arakaki
e1bdf7e8cf Use overlay to highlight input area background
* In the previous version which uses text property, syntax
  highlighting in mumamo was not working. This change fix
  this problem.
* If I am going to use pygmentize + ansi-color, which use
  face text property, implementation using text property
  won't work.  So, using overlay is better choice.
* Code is clearer than the previous version.
2012-05-21 16:28:51 +02:00
Takafumi Arakaki
569c5a93d6 Merge branch 'master' into face-input 2012-05-21 15:41:21 +02:00
Takafumi Arakaki
51881b40f6 Set mumamo-background-chunk-major in debug-ein.el 2012-05-21 15:20:01 +02:00
Takafumi Arakaki
31cdf7ae2e Merge branch 'master' into face-input 2012-05-21 05:51:10 +02:00
Takafumi Arakaki
5bff8e010e Hack to set header-line-format in mumamo 2012-05-21 05:48:51 +02:00
Takafumi Arakaki
70866498af Event notification using header-line 2012-05-21 05:48:49 +02:00
Takafumi Arakaki
dcfbacf857 Move debug utils from debug-ein.el to ein-dev.el 2012-05-21 05:48:45 +02:00