Commit graph

3086 commits

Author SHA1 Message Date
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
Takafumi Arakaki
1a2fa43500 Fix: BG face vanishes from empty input area
This happens when new cell has no input text.  When some text is
typed, BG color for the text is not what ein:cell-input-area
specifies.
2012-05-21 05:47:29 +02:00
Takafumi Arakaki
67fc2a2b13 Add ein:cell-input-area face 2012-05-21 05:46:41 +02:00
Takafumi Arakaki
91059bec30 Support application/emacs-lisp mime type 2012-05-21 01:46:37 +02:00
Takafumi Arakaki
6120ebe59b Add faces ein:cell-input/output-prompt 2012-05-20 23:38:31 +02:00
Takafumi Arakaki
f09cccf4ad Fix typo: s/ouput/output/g 2012-05-20 23:27:31 +02:00
Takafumi Arakaki
07203e6ab4 Simplify code for stream output 2012-05-20 23:13:00 +02:00
Takafumi Arakaki
78d3468d9a Use 'font-lock-face property instead of 'face
Now ein:cell-output-stderr face is visible in mumamo.
However, to make it visible mumamo-background-chunk-major face must
have no background property.  Otherwise background color is overridden
by mumamo-background-chunk-major.
2012-05-20 22:51:45 +02:00
Takafumi Arakaki
4f9b583fac Highlight stderr output (not working with mumamo) 2012-05-20 22:43:56 +02:00
Takafumi Arakaki
8b8d12924c Add comments on ein:cell-insert-output 2012-05-20 21:14:42 +02:00
Takafumi Arakaki
8f125daa39 Pass the previously failing six cell output tests
The bug was in ein:cell-insert-output.
2012-05-20 21:12:53 +02:00
Takafumi Arakaki
76d677c77c Merge branch 'extra-output-tests'
Newly added 6 tests fail.
2012-05-20 21:00:43 +02:00
Takafumi Arakaki
e625540e00 Add new tests for multiple pyout/display-data 2012-05-20 20:55:49 +02:00
Takafumi Arakaki
97bb0302d0 Improve test generator for cell output 2012-05-20 20:50:40 +02:00
Takafumi Arakaki
ca685cbe36 Insert extra newline in footer if necessary
This is similar code I need to add to ein:cell-insert-output in the
previous commit.  Note that I need to invalidate footer ewoc node in
ein:cell-append-output.
2012-05-20 20:04:04 +02:00
Takafumi Arakaki
e96746d4e5 Better ewoc pretty printer for stream
ein:cell-insert-output handles flushed stream better.

But this change is kind of contaminating other output type because now
ein:cell-insert-output inserts newline in the region of other output
type node if the previous output is stream type.  Maybe I need something
more like DOM.
2012-05-20 19:54:21 +02:00