Commit graph

2257 commits

Author SHA1 Message Date
John Miller
4e482cafd9 Stop being so clever with error handling. Stepping away from eieio.
Automatically calling ein:notebooklist-login when a content API calls is a BAD
IDEA. Much better to warn and suggest, and if debugging is enabled throw the
error so hopefully a backtrace can be generated.

Taking some initial steps away from eieio and towards cl-generic.
2017-02-01 09:25:47 -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
2615d77a7f ob-ein's custom header name should be :image, not :images. 2017-01-30 21:34:58 -06:00
John Miller
28ed036d41 Log save hook error warnings to *ein:log-all* instead of *Messages*
Some believe that alerting the user in the *Messages* buffer when there is an
error trying to run the before-save-hooks is overly verbose and a nuisance. EIN
should still warn what is happening, I think, but instead of `warn`ing the
message no goes to the *ein:log-all* buffer.
2017-01-29 11:42:06 -06:00
John Miller
ceec3f8feb Fix missing paren in ein-worksheet.el
Paredit, why have you abandoned me?
2017-01-29 11:12:31 -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
2152771182 Style update.
Because I am fickle.
2017-01-19 17:53:36 -06:00
John Miller
3412470b61 More convenience finding the channels debug buffer
Post Ipython 2.0 there are no longer separate websocket connections for iopub
and shell, they now share the same websocket connect. This is a simple
convenience function for finding the websocket log buffer for the new-style
connection.
2017-01-19 11:27:22 -06:00
John Miller
81480d9e58 Actually write a correct example for using the :image header. 2017-01-18 10:39:33 -06:00
John Miller
5c945a174f Document changes to ob-ein. Error when no :image header specified.
ob-ein will alert the user if they are generating an image in the ob-ein source
block and no :image header has been supplied. Added some documentation for good
measure, though people will probably still get tripped up by this.
2017-01-18 10:31:30 -06:00
John Miller
7e222f3ebf ob-ein: better formatting for results.
Return the results of execution as a single string instead of a list of strings.
This allows some more flexibility when dealing with :results parameters and
seems to fix a bug with inserting matplotlib images. Hint: try using `:results
value raw`.
2017-01-18 09:58:37 -06:00
John Miller
b52ccbd46d Version bump, integrate docs into Cask, new doc theme.
Using alabaster for the documentation theme. Building documentation now relies
on having cask present, which does a better job of tracking dependencies than
the old way.
2017-01-17 06:55:44 -06:00
John Miller
e226b30139 Follow redirects, numerous other fixes.
Content api tries to handle redirects, pointing new content towards the
redirected url instead of the one supplied by the user. Login with redirects not
working, though.

Other fixes:

 - Fixed bug in ein-ac that was generating errors outside of ein buffers.
 - New function `ein:pyools-set-figure-size` as shortcut for modifying
   matplotlib figsize rcParam.
 - ob-ein will output tracebacks when ein source block generates an error.
2017-01-11 07:42:06 -06:00
John Miller
f8e78a421e More robust notebook saving, object source.
More graceful handling of errors in before-save-hook. Also improved
pytools find-source.
2017-01-07 15:07:24 -06:00
John Miller
ed9c0cf606 Fix for issue #162.
Add X-XSRFTOKEN header when cookie is present. See notes for notebook
[v4.3.1](https://blog.jupyter.org/2016/12/21/jupyter-notebook-4-3-1/).
2017-01-03 20:11:28 -06:00
John Miller
481d8a879f Smarter ein block execution in org.
Be smarter when detecting if ein source block has finished executing. Also make
timeout user-configurable via the variable `ein:org-execute-timeout`.
2016-12-28 09:41:02 -06:00
John Miller
3cdb353fe2 Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook 2016-12-28 09:36:33 -06:00
John Miller
803e541f99 Merge pull request #159 from sam-s/master
autoload ein:notebooklist-login (issue#154)
2016-12-28 09:34:53 -06:00
Sam Steingold
5d06c91349 autoload ein:notebooklist-login (issue#154) 2016-12-27 12:04:25 -05:00
John Miller
a81aef7386 Source tracking in EIN ipdb sessions.
Slowly recreating functionality available in python-mode.
2016-12-24 12:51:54 -06: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
3055064e85 Fixes for README. 2016-12-23 11:02:18 -06:00
John Miller
c35f9d338d Better README info.
I wonder if anyone actually reads??
2016-12-22 21:30:25 -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
773d22c365 Merge remote-tracking branch 'refs/remotes/origin/104-load-magic' 2016-12-18 23:20:14 -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
1e56d388de Merge remote-tracking branch 'refs/remotes/origin/38-fixing-testing' into 104-load-magic 2016-12-18 19:30:06 -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
John Miller
4bc3acf001 Desperate attempts to fix default coding when running testein. 2016-12-18 19:17:13 -06:00
John Miller
ea0c3e5433 testein.py: Stop emacs from launching interactively? 2016-12-18 18:17:22 -06:00
John Miller
fb31f0dec8 testein.py: Disable token authentication
I hope.
2016-12-18 18:11:33 -06:00
John Miller
abeb37e675 Testein and cask working together, maybe. 2016-12-18 16:21:03 -06:00
John Miller
b094ba3c2a Travis fails if there is no log directory. 2016-12-18 14:31:53 -06:00
John Miller
0bc34562fe Dial it back a bit... 2016-12-18 14:23:07 -06:00
John Miller
9558857828 Merge pull request #152 from sam-s/master
bind goal-column to nil around ewoc-goto-node to fix issue#146
2016-12-18 14:21:16 -06:00
John Miller
7a5456462b Try to use the right emacs version. 2016-12-18 14:18:31 -06:00
John Miller
a14a122300 Correcting poor choice in names for environment variables.
Should be EVM_EMACS, not EMACS (it is very confusing for travis otherwise).
2016-12-18 14:10:28 -06:00
John Miller
de9318ae5b Use @rejeep's helpful gist.
@rejeep suggested this gist to facilitate my difficulties getting
travis to work.
2016-12-18 14:01:10 -06:00
John Miller
87e8b06dbd Merge remote-tracking branch 'refs/remotes/origin/104-load-magic' into 38-fixing-testing 2016-12-18 13:56:03 -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