Some good ideas from @dickmao, the only difference here is that notebook
autosave is not defaulted to being turned off as this might produce some
unexpected behavior for existing users. What I am doing is decreasing the
default frequency to autosaving once every five minutes.
Use deferred and callbacks instead of `:sync t` for tkf requests which
is known to have issues. Query server attributes once on
notebooklist-open to avoid sequencing issue #176 (but allow Resync).
Under curl backend, a second request for the same "key" as a pending
request will abort the latter, which has resulted in a clobbered
curl-cookie-jar file, so merely warn and don't abort.
Fix#176
Try, but seem to still be mostly failing. Think this is more a personal setup
issue than something in general but this change should, at the very least, not
do any harm.
Really basic support for eldoc, buidling off the oinfo cache code written to
support function annotations for the ein company backend. In theory should also
work the other completion backends, but untested at the moment.
Loading large notebooks (>1M) can be slow. At least some of this is due to
downloading from the jupyter server, but this operation is asynchronous and
should not block emacs. My suspicion is that when Emacs blocks it is when it is
generating the internal data structures used to represent the notebook in emacs.
This is somewhat unavoidable, but part of the slow down may be due to reaching
the cons threshold. These changes try to temporarily increase the cons threshold
while loading the notebook. We'll see if it helps at all.
Passing "default" to `ein:get-kernelspec' would cause it to return a string
naming the actual kernelspec, which just won't do. So we look for that case and
then look for the real kernelspec.
As well as going to a non-deferred implementation for
`ein:notebooklist-change-url-port' the code now properly restarts the nb kernel
when changing the server the notebook is running on.
Also a small change to the formatting of the notebooklist buffer.
Please see the new variable `ein:completion-backend'. Use this variable to
configure which completion backend to use in ein. Currently we support
auto-complete, company-mode, and jedi using auto-complete.
It seems there are enough people out there still on Emacs 24 to warrant undoing
some of my recent moves away from eieio to cl-generic. For the near future I
will try to keep any changes that are incompatible with Emacs 24 to a
development branch. There is still probably plenty of opportunity to make the
code more future-proof for an eventual move away from eieio (I'm looking at you
oref and sref...)
Like `ein:notebook-update-url-or-port', but for all the notebooks opened from the
current notebooklist buffer.
Fix bug in `ein:notebook-update-url-or-port' that was keeping the kernel from
restarting.
Modern org (i.e. as of version 9) uses `org-link-set-parameters' to configure
storing and using of custom link types, deprecating the use of
`org-add-link-type' and `org-store-link-functions'.
Also update autoload definitions else user will never see the changes!
Additional documentation for `ein:notebook-update-url-or-port'.
Silly typo in ein-kernel.el. Querying kernelspecs is slightly more efficient,
caching results when url is a string or port (previously just cached results for
ports).
This reduces some of the complexity in testein.py, but unfortunately running
tests is still unreliable. Running batchwise tests don't work at all in Windows,
and running from inside emacs tests often need to be run multiple times before
they pass.
The worst offender is the delete notebook test, which will pass on usually only
1 out of 3 tries.
Testing seems to have revealed a couple bugs, so win??
There may be situations when a jupyter server restarts at a new url/port while a
notebook is open. This function allows the user to specify the new url/port and
continue using the notebook (or at the very least, save any changes made while
the server was down and rebooting). EIN will helpfully try to restart the kernel
once the url is changed. Jupyter may complain about session not being found, but
it does not seem to affect the running kernel.
When calling `ein:jupyter-server-stop` ask to user if they are sure and also
give them the option to save any unsaved notebooks before killing the server.
Before closing the server also close any open notebook buffers.
Display value of object's __repr__, link to source when available, and
documentation.
Adding command and keybinding (C-ci) to notebook buffer keymap.
Get rid of unnecessary api check when rendering notebooklist buffer.
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.
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.
Prettier kernelspec names in notebooklist buffers. Only load pytools for python
kernels, which hopefully will help with connecting to non-python kernels.
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.
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.
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.
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.
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).
Fixed bug with `ein:notebook-open-in-browser`; this command should now
work in IPython notebook 3.0 and later.
Notebook/worksheets now display the name of the kernel that the notebook
is running under. Next step is to make this clickable!
Also some documentation for my new super-secret project to add
evaluation of dynamic javascript to ein.
Let the user control whether or not to view slide attributes in current
worksheet via `ein:worksheet-toggle-slideshow-view` (C-c S).
Also added a couple more slide attributes (fragment, notes) as
these appear to be support in current Jupyter version.