Commit graph

16 commits

Author SHA1 Message Date
John Miller
334bb46000 ein-cell-edit: Smarter major mode selection.
Do a better job of selecting the major mode for cell edit buffers. Will try to
detect if there is a cell magic, like %%html or %%latex, and set an appropriate
major mode.

If it cannot determine what the major mode should be and the cell type is raw,
the major mode will default to whatever is set in the user customizable variable
`ein:raw-cell-default-edit-mode', which by default is set to `'LaTeX-mode'.
2017-06-02 21:05:02 -05:00
John Miller
e88f7f3d5f Fix for #188.
Make even more unique edit-cell buffer names. Check that an edit-cell-buffer
does not already exits before creating one.

Also try to be even more aggressive in limiting output in backtraces when
debugging ein.
2017-04-02 08:59:02 -05:00
John Miller
faf61c3cc3 Fix bug that was preventing cell edit's from saving.
Bad bug! No pudding for you!
2017-02-09 11:56:51 -06:00
John Miller
94e334cbf0 Try to keep long running sessions from expiring
The function `ein:notebooklist-enable-keepalive` and
`ein:notebooklist-disable-keepalive`, respectively enable a timer that
ocassionally (on the order of hours) sends a query to the notebook server. The
goal is to keep cookies and sessions from expiring in long running notebooks.
We'll see if it works.
2017-01-31 10:44:04 -06:00
John Miller
ac2aa7f88e Better live updating in cell editing buffers, less buggy undo
Saving in a cell editing buffer now actually causes the cell in the worksheet to
be dynamically updated (oh how we have waited for this moment).

Try to get cell undo actions to be less likely to trigger an error.
2017-01-28 11:08:26 -06:00
John Miller
06eb2eea2c Cleanup, better error handling, remove request cookie defadvice.
tkf/emacs-request#60 was recently fixed, so no longer need to defadvice
`request--netscape-cookie-parse. Changed names of some obsolete variables. Also
trying to be a bit more clever in error handling by judicious use of
condition-case.
2016-12-22 12:19:52 -06:00
John Miller
f7225a65ba More informative notification, assume python when no kernelspec.
Improved notification in the header when the notebook has no associated
kernelspec.

For advanced cell editing assume codecells contain python code when the notebook
has no associated kernelspec.
2016-12-14 15:55:18 -06:00
John Miller
c669d8aa54 Overlays that work
Overlay to make text being edited read-only, but not so read-only
that we can't save text from the edit popout buffer.
2016-11-10 18:20:19 -06:00
John Miller
17a445946d Polishing cell edit buffer.
Now with overlays and better point motion in the original buffer!
2016-11-10 07:13:16 -06:00
John Miller
c70dee7733 Taceback from cell edit buffer, more informative version
Jump to tracebacks from cell edit buffers.

Slightly more informative on version of jupyter we are working with.
2016-11-05 17:49:52 -05:00
John Miller
8e3764044c Update documentation, bumpb version. 2016-10-30 18:37:14 -05:00
John Miller
fb1fd315a6 Anaconda-mode workaround, building for a multi-language kernel
Small hack to allow python mode source editing popout buffers (ala C-c')
work with anaconda-mode.

Do major mode selection based on language specified in kernelspec, this
should allow better support when using ein with kernels other than python.
2016-10-28 14:13:32 -05:00
John Miller
c9894d14b7 Cleanup, slightly more informative docs. 2016-10-26 14:08:19 -05:00
John Miller
6ec7789454 Execute the cell as you edit it.
You can now execute cells in the edit sub-buffer and the results will
magically appear in the original notebook. Awesome!
2016-10-26 13:25:52 -05:00
John Miller
a518fb4f24 Better buffer switching behavior after editing.
Make transition out of cell edit buffers smoother.

Taking a look at Python code for finding source of python objects.
2016-10-26 11:02:25 -05:00
John Miller
c0144e2cbf Edit notebook cells in popout buffer ala org-mode
Using C-c', users can create a temporary buffer running an appropriate
mode to edit the contents of a notebook cell. This functionality is
intentionally very similar to what org-mode provides for editing blocks
of code or other.
2016-10-25 18:00:51 -05:00