Takafumi Arakaki
5a65aba368
Add DATA-TYPE argument to ein:query-ajax
...
This solves the problem due to the url-retrieve gotcha.
Main changes:
* Separation of the function to parse buffer and callback.
This is good because parsed data can be used from multiple
callbacks (SUCCESS and STATUS-CODE).
* As a result, current buffer for callbacks is not process
buffer anymore. Callbacks should not assume any particular
current buffer.
* RESPONSE-STATUS is added to the arguments for callbacks
to pass around the value of url-http-response-status.
Previous attempts:
* cb5f53c183
:
Simpler and better fix than the previous one
* fff269fc39
:
ein:notebooklist-delete-notebook works again
2012-05-26 20:12:31 +02:00
Takafumi Arakaki
33ef77d3be
Add "Coding rule about current buffer."
...
And apply it to the previous fix.
2012-05-25 22:58:01 +02:00
Takafumi Arakaki
be1148ff4a
Fix a bug: retrying save saves random texts
...
This is because ein:notebook-to-json touches to current buffer and
read the text from there.
2012-05-25 22:43:56 +02:00
Takafumi Arakaki
81334a86e8
Use ein-query-ajax in ein:notebook-save-notebook
...
This change adds timeout to notebook-save-notebook. This is useful
since sometimes Emacs does not start transaction and have opened
process hanging around.
This change also fixes a bug which might be occurred in the previous
version: ein:notebook-discard-output-p is called from
ein:notebook-save-notebook via ein:notebook-to-json but not on the
notebook buffer. This function access to the buffer, but not treated
properly. This change fixes this problem.
2012-05-25 22:12:34 +02:00
Takafumi Arakaki
63835d82be
Unbind C-c C-d (delete-cell)
2012-05-25 18:06:45 +02:00
Takafumi Arakaki
e5a4e8a229
Allow no undo after deleting a cell
2012-05-25 17:57:52 +02:00
Takafumi Arakaki
ce182462f3
Bit more robust ein:notebook-del
2012-05-25 16:11:26 +02:00
Takafumi Arakaki
7cd63ecad4
Add ein:notebook-kill-all-buffers command
2012-05-25 15:44:00 +02:00
Takafumi Arakaki
559da7b154
Merge branch 'filter-output-on-save'
2012-05-25 15:16:51 +02:00
Takafumi Arakaki
315b106c96
Start using notification widget
2012-05-25 02:04:07 +02:00
Takafumi Arakaki
3660960013
Add config to discard output on notebook save
...
This is done by adding one configurable variable:
ein:notebook-discard-output-on-save
2012-05-25 00:23:09 +02:00
Takafumi Arakaki
62e096454d
Kill log buffer when notebook is closed
2012-05-24 19:20:45 +02:00
Takafumi Arakaki
89b7f008aa
Little bit wiser rename command
2012-05-23 21:50:25 +02:00
Takafumi Arakaki
617f166a5c
Flush out echo area after saving notebook
...
Otherwise, "Connecting to..." or "Retry saving..." remains in the echo
area. Also, message when the saving is fail is added.
2012-05-23 19:08:07 +02:00
Takafumi Arakaki
3cf3a6d17a
Don't move pointer when copying cell
2012-05-23 18:49:54 +02:00
Takafumi Arakaki
160f15becd
Fix: copied cell can't be executed
2012-05-23 18:46:09 +02:00
Takafumi Arakaki
905aee9133
Quick fix for ein:notebook-cell-from-type
2012-05-23 15:46:51 +02:00
Takafumi Arakaki
2f8676ee4c
Rename to ein:notebook-complete-command
2012-05-23 11:27:52 +02:00
Takafumi Arakaki
e0b99eb069
Add ein:connect-complete-command
2012-05-23 11:26:51 +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
806d10ae06
Pass the test ein:notebook-request-help
2012-05-23 02:43:44 +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
1c1135685b
Fix ein:notebook-new: remove msg-cell-map
2012-05-22 23:51:04 +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
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
72b2adca4d
Adapt notebook to the changes in kernel (WIP)
2012-05-22 20:50:47 +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
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
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
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
70866498af
Event notification using header-line
2012-05-21 05:48:49 +02:00
Takafumi Arakaki
91059bec30
Support application/emacs-lisp mime type
2012-05-21 01:46:37 +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
693a2fb92b
Fix ein:notebook-modified-p
2012-05-20 02:34:10 +02:00
Takafumi Arakaki
e389e1d9dd
Fix: SVG was not shown
2012-05-20 01:56:40 +02:00
Takafumi Arakaki
b9b5dc57ba
Ask before killing Emacs if notebook is not saved
2012-05-19 18:16:35 +02:00