Commit graph

202 commits

Author SHA1 Message Date
Takafumi Arakaki
49fa8629b9 Add alternative keybinds for goto/move cell commands
As it seems that some smartrep keybinds does not work properly in
MuMaMo-enabled buffer, this change provides some shortcuts for these
keybinds.

I sent a pull request to smartrep.el regarding this issue:
myuhe/smartrep.el#7
2012-06-14 16:22:13 +02:00
Takafumi Arakaki
a105133bba Kaymap is defined in top-level let clause
There should be no functional change by this change.
This makes it easier to change the keymap while running EIN.
I can just evaluate the let clause.  In the previous version,
I couldn't do that because rebinding the keymap does not alter the
keymap used in the running mode.
2012-06-14 12:42:57 +02:00
Takafumi Arakaki
df9299f02e Add ein:notebook-kill-kernel-then-close-command 2012-06-14 12:24:40 +02:00
Takafumi Arakaki
05aeab19ad Deactivate region after killing/copying cells 2012-06-13 12:58:07 +02:00
Takafumi Arakaki
847c71072f Fix ein:notebook-copy-cell-command
Many cells were put in the kill-ring one by one, instead of a list of cells.
This is wrong.
2012-06-13 04:47:57 +02:00
Takafumi Arakaki
926195da68 Add ein:notebook-insert-clone-below 2012-06-13 00:54:19 +02:00
Takafumi Arakaki
7dc75197af Support killing cells in region 2012-06-13 00:25:55 +02:00
Takafumi Arakaki
0fd56526d1 Document the previous improvement 2012-06-12 23:30:13 +02:00
Takafumi Arakaki
10edb8d239 Tweak documents 2012-06-11 14:24:20 +02:00
Takafumi Arakaki
6cd6c3b2c7 Document more 2012-06-11 06:15:34 +02:00
Takafumi Arakaki
724099ac49 RST-friendly fix 2012-06-11 04:46:11 +02:00
Takafumi Arakaki
37da52a213 Tweak docstrings to make them RST-friendly 2012-06-11 04:21:30 +02:00
Takafumi Arakaki
0437ca16e8 Change the spec of ein:notebook-discard-output-on-save 2012-06-10 04:04:31 +02:00
Takafumi Arakaki
cf27e430f8 Add ein:pytools-jump-back-command (M-,) 2012-06-10 02:14:34 +02:00
Takafumi Arakaki
7ebaac3173 Remove unnecessary progn 2012-06-09 04:40:23 +02:00
Takafumi Arakaki
1f55cfe918 Hack python.el to improve ein:notebook-console-open 2012-06-09 04:38:35 +02:00
Takafumi Arakaki
5a73b7b593 Make ipython executable for console configurable 2012-06-09 03:36:08 +02:00
Takafumi Arakaki
7bbdc03c38 Add ein:notebook-force-kill-buffers 2012-06-08 13:17:41 +02:00
Takafumi Arakaki
1df0da17f0 Fix ein:notebook-request-open-callback-with-callback 2012-06-08 13:15:55 +02:00
Takafumi Arakaki
35dafaed79 Add callback to the function ein:notebook-open 2012-06-08 11:42:42 +02:00
Takafumi Arakaki
f938e71943 Better messaging in ein:notebook-view-traceback 2012-06-07 23:46:42 +02:00
Takafumi Arakaki
cd8d8b9f3e C-c C-x calls ein:notebook-view-traceback 2012-06-07 23:42:18 +02:00
Takafumi Arakaki
907e8cf0ce Add ein:notebook-view-traceback command 2012-06-07 16:08:00 +02:00
Takafumi Arakaki
41de95c9a6 Add traceback viewer module 2012-06-07 15:56:38 +02:00
Takafumi Arakaki
7b93f7c647 Improve ein:notebook-ask-before-kill-emacs
It was needed to answer `y' when killing Emacs and there exists
unsaved buffers.  This change eliminate the need for that by killing
buffers forcefully.
2012-06-06 22:36:47 +02:00
Takafumi Arakaki
422adbdd2b Change variable type of event: use symbol
As there is no "pattern matching" for event handling anymore, using
cons for event-type makes no sense.
2012-06-06 21:16:48 +02:00
Takafumi Arakaki
886ca90fe3 Fix cell yank
This change fix this error:
  Got error from the on-message function: Unbound slot: "#<class ein:codecell>", "#<ein:codecell Cell>", :events, oref

This error was issued when executing yanked cell because the :events
slot of the yanked cell was empty.
2012-06-05 21:52:51 +02:00
Takafumi Arakaki
f1c25510b7 Set events properly for the already existing cells 2012-06-04 19:46:19 +02:00
Takafumi Arakaki
6b3f7d1f8c Code cell sets dirty flag via event 2012-06-04 16:33:19 +02:00
Takafumi Arakaki
93199a392b Remove cell from kernel-execute callbacks 2012-06-04 16:18:17 +02:00
Takafumi Arakaki
853a9ec50e Add ein:pytools-jump-to-source-command (M-.)
As this command requires to invoke multi-line python code, ein.py is
added to store python code needed for EIN.  The sys.path is added
automatically when the kernel is started so that any function can be
called as ``__import__("ein").FUNCTION()``.  This way, namespace is
not contaminated at all.
2012-06-03 17:30:16 +02:00
Takafumi Arakaki
5766a68c29 Add ein:$kernel-after-execute-hook
... and hook ein:kernelinfo-update-ccwd to update default-directory in
very eager manner.
2012-06-03 00:22:16 +02:00
Takafumi Arakaki
a7ed044dc4 Merge branch 'kernelinfo' into master
Conflicts:
	ein-websocket.el
2012-06-02 22:12:50 +02:00
Takafumi Arakaki
be0c3665b9 Fix ein:notebook-toggle-cell-type: set kernel
Set kernel slot if the converted cell is a code cell.
2012-06-02 21:47:03 +02:00
Takafumi Arakaki
351ff8b26b Add ein:notebook-eval-string 2012-06-02 20:40:22 +02:00
Takafumi Arakaki
d922db4b38 Add ein:notebook-change-cell-type command 2012-06-02 18:46:02 +02:00
Takafumi Arakaki
690c752a6e Adapt ein:notebook-toggle-cell-type to v3 notebook 2012-06-02 18:44:29 +02:00
Takafumi Arakaki
043809cc76 Add after-start-hook to kernel and use it for info 2012-05-31 23:01:12 +02:00
Takafumi Arakaki
0715c33e46 Add ein:kernelinfo-init 2012-05-31 18:12:44 +02:00
Takafumi Arakaki
03437ff35a Add functions to sync directory with kernel's CWD
Another possible way to implement this is to use user_expressions.
However, replied message is Python's repr.  As there is no reliable
way to convert it except using Python itself, I am using stream to
get CWD.
2012-05-27 05:19:17 +02:00
Takafumi Arakaki
fbbff8b644 Remove hard-coded timeout 2012-05-27 02:03:58 +02:00
Takafumi Arakaki
95434c845d Use ein:query-ajax in ein:notebook-request-open 2012-05-26 20:41:47 +02:00
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