Commit graph

949 commits

Author SHA1 Message Date
Sam Steingold
5d06c91349 autoload ein:notebooklist-login (issue#154) 2016-12-27 12:04:25 -05:00
John Miller
cfd0e8a3d7 Fix clear_output in the Jupyter age and a bug fix.
Finally do the right thing when clear_output is received. Closes issue #24. Also
fix a nasty bug that might occurr when trying to open a notebook with no
associated kernelspec.
2016-12-23 16:33:35 -06:00
John Miller
559b956cfa Jupyter console workaround for windows systems. 2016-12-23 14:40:21 -06:00
John Miller
9468f40bce Better kernelspec display name, pytools only for python kernels.
Prettier kernelspec names in notebooklist buffers. Only load pytools for python
kernels, which hopefully will help with connecting to non-python kernels.
2016-12-22 14:04:51 -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
1b3aa10d51 Properly detect set_next_input payloads.
With this change %load magic works correctly.
2016-12-18 23:09:07 -06:00
John Miller
45f9b00449 Better macro name, make sure it gets required.
Better name for support macro to temporarily disable undo, add a require to the
code where it is being used.
2016-12-18 22:19:50 -06:00
John Miller
d7ce140487 Merge remote-tracking branch 'refs/remotes/origin/master' into 104-load-magic 2016-12-18 19:29:55 -06:00
John Miller
495d652ee0 Cosmetic updates to code formatting. 2016-12-18 19:27:35 -06:00
Sam Steingold
fa18077e28 bind goal-column to nil around ewoc-goto-node to fix issue#146 2016-12-18 13:10:25 -05:00
John Miller
d57c74577f Undo for cell actions: motion, insert, execute.
Some cell actions now have a true undo. Moving, inserting and executing cells
can all be undone. Deleting cell does not have an undo at the moment, though the
preferred method for users is to call ein:worksheet-kill-cell which puts the
removed cell into the kill-ring.
2016-12-16 18:01:06 -06:00
John Miller
9af2516c91 Cosmetic updates to code formatting. 2016-12-15 20:34:19 -06:00
John Miller
50ef0f3a33 Update README, fixes for ein-console and ein-ipdb
Grammar and info accuracy improvements for the README. Trying to catch up to a
jupyter world in ein-console, though not 100% there yet.

Fixing an annoying error in debugger comint buffer that was ocurring when
quitting an ipdb debugging session.
2016-12-15 11:22:42 -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
d85717bd24 Ensure inserted images are non-whitespace characters.
This is intended to fix #149.
2016-12-14 13:02:21 -06:00
John Miller
a96fd5d0bd Patch request to fix reading cookies with curl backend
Request, as of v0.2.0, does not properly read HttpOnly cookies as it thinks they
are comments. This change is to temporarily work around that issue.
2016-12-14 12:32:26 -06:00
John Miller
3fef68d053 Fix authentication with newer Jupyter notebook versions
Jupyter notebook post v4.0 (4.1?) now stores cookies as HttpOnly. This fix
partially addresses, at least with curl request backend, however request still
needs to be updated to recognize these cookies (see issue #148).
2016-12-13 17:47:23 -06:00
John Miller
64eb1b1e5b Cleaner indenting, run before-save-hook hooks before saving.
Some users have seen problems indenting Python code in codecells; this may be
due to having `indent-tabs-mode` set to a non-nil value. I now force it to be
nil in all ein notebook/worksheet buffers.

Also before saving a notebook hooks defined in `before-save-hook` are run.
2016-12-12 10:26:38 -06:00
Sam Steingold
bb81d08065 require all dependencies
provide this feature before requiring ein-notebook to avoid
the circular dependency error
2016-12-05 09:14:41 -05:00
Sam Steingold
7dd59f469f pass the required LIMIT' arg to looking-back' 2016-12-05 09:03:59 -05:00
Sam Steingold
2dca181338 bind new_slide_type with let' instead of setting it with setq' 2016-12-05 08:55:48 -05:00
John Miller
262dbca88a The actual encoding fix.
Sigh.
2016-12-01 21:12:43 -06:00
John Miller
02b790665b Fix (maybe) encoding issues when saving notebooks.
This hopefully fixes issues #142 and #133.
2016-12-01 21:10:20 -06:00
John Miller
2b7b9f20fa Improving ipdb support.
EIN ipdb buffer should look better on Linux machines now. The extra characters
were someone's (ipython?) attempt at doing ansi coloring I think.

Also trying to make the ipdb comint buffer more canonical, with the hope to get
it to work with realgud. Not quite there yet, unfortunately.
2016-11-29 22:06:03 -06:00
John Miller
87053c7459 Formatting, tweaks to menu and an improved error message.
Adding a couple commands to EIN's menu and an attempt to make cell execution
message more informative.
2016-11-23 12:34:06 -06:00
Sam Steingold
92aabe399c string-to-int is obsolete and was removed from Emacs 26.1 2016-11-16 14:14:33 -05:00
Josiah Schwab
23c8148cb7 Update notebooklist url functions to work with jupyter
Previously, base-path would be nil when version was 4 (corresponding
to the current jupyter release).
2016-11-11 09:48:47 -08:00
John Miller
7978961d96 Save a copy of the notebook, fix deleting notebooks.
Can save a copy of an existing notebook to a new name via
`ein:notebook-save-to-command` (I still haven't thought of a good,
default keybinding, however).

Deleting notebooks now works again.
2016-11-10 21:31:38 -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
684ccbede4 Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook 2016-10-30 11:41:10 -05:00
Jonas Bernoulli
ec28c8f69a Remove accidentally checked in file 2016-10-30 11:56:52 +01:00
John Miller
19303cb637 Fix notebooklist render, remove connect_request
Notebooklist was not showing kernel status anymore.

Connect_request messages are deprecated since v5.0 of the messaging
spec, and ein never did much anyway with the message.
2016-10-29 09:43:40 -05:00
John Miller
1c04701a90 Only autosave if the buffer has been modified. 2016-10-28 14:54:07 -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
John Miller
37f8e4d041 Merge branch 'master' into org-babel 2016-10-24 14:56:17 -05:00
John Miller
dd494cba59 Less talkative notebook saving.
EIN now logs messages regarding notebook saving using 'verbose level.
2016-10-23 19:26:21 -05:00
John Miller
701ddbe39c Autosaving and checkpoints as distinct actions.
Saving a notebook and creating a checkpoint are related, but distinct
activities. EIN does better now with this distinction. See updates to
the documentaiton (which should get pushed to github any day now).
2016-10-21 12:10:49 -05:00
John Miller
bdc140e446 Bump version to 0.11.0 2016-10-20 12:28:42 -05:00
John Miller
c7bf4f6521 Update docs, get scoping right for notebook checkpoint calls
Document the new checkpoint functions. Fix issue that was preventing
the list of checkpoints from being updated in the notebook.
2016-10-20 11:14:23 -05:00
John Miller
bb95f71f5e Give ein notebooks content checkpoint functionality. 2016-10-19 14:43:19 -05:00
John Miller
7d8474e2c4 Low level support for managing notebook checkpoints.
Via the Jupyter contents REST API.
2016-10-19 11:57:34 -05:00
John Miller
f74c19ecb6 Revert "Moving away from eieio to cl-generic"
This reverts commit 55176c3a4c.
2016-10-17 17:20:41 -05:00
John Miller
62d9f1117d Moving away from eieio to cl-generic
The goal is to eventually eliminate most of the warnings that are
generated when byte-compiling ein.

Do this over several commits to make it easier to revert in the likely
event that something breaks.
2016-10-17 17:20:41 -05:00