Commit graph

1099 commits

Author SHA1 Message Date
Moogen Tian
71536bd748 ein-jupyter: Avoid always locating jupyter server startup command
Instead of always prompting the user for the path to the jupyter
executable, it will try to use the value of `*ein:last-jupyter-command*' or
the value of the customizable variable `ein:jupyter-default-server-command'
when the `ein:jupyter-server-start` command is called without C-u prefix arg.
2017-11-16 15:31:41 +08:00
John Miller
f63451ca03 ein-notebooklist: Improved ein:notebook-update-url-or-port.
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.
2017-11-07 15:14:45 -06:00
John Miller
ebbf7da36d ob-ein: More stable when starting sessions.
Still not 100%, but ob-ein behaves slightly better when trying to connect to a
notebook that is not currently open.
2017-11-07 15:13:23 -06:00
John Miller
a03eee4cd7 ein-jupyter: More timeout adjustments. 2017-11-04 11:27:31 -05:00
John Miller
c5421b090f More eieio warning cleanup. 2017-11-04 11:27:06 -05:00
John Miller
eaded1e013 ein-kernelinfo: Warning cleanup. 2017-10-24 12:43:03 -05:00
John Miller
5f61a7fd09 ein-shared-output: Warning cleanup. 2017-10-24 12:42:41 -05:00
John Miller
58e29ea774 ein-events: Clean byte compile warnings. 2017-10-24 12:14:20 -05:00
John Miller
af13e8cdb1 ein-worksheet: Clean byte-compile warnings. 2017-10-24 12:12:50 -05:00
John Miller
7e722763ce ein-notification: Clean up byte-compile warnings. 2017-10-24 12:10:56 -05:00
John Miller
a20562e1fc Prepare for version bump. 2017-10-24 11:03:50 -05:00
John Miller
08a021781f ein-jupyter: We really need accept-process-output on Windows. 2017-10-23 19:40:06 -05:00
John Miller
9c2e6fe7c8 ein-company: Only check for punctation near completion point.
This will allow ein-company backend to complete in the middle of a line.
2017-10-23 19:39:00 -05:00
John Miller
3fa575bbf4 ein-company: Tweak punctation check.
Spaces should also not trigger completion.
2017-10-22 19:20:41 -05:00
John Miller
0a3e602eb5 ein-jupyter: Tweak deferred:wait factor when starting jupyter.
Not at all sure why, but succesfully starting jupyter and detecting login token
info is sensitive to this factor. On Windows, a call to accept-process-output
prior to the deferred chain also works, but unfortunately seems to cause issues
on some Linux installations.

For the moment a factor of 10 seems to work, but we will see what feedback from
the community is. This may need to be a customizable variable.
2017-10-22 13:58:28 -05:00
Benda Xu
ab3cea045f lisp/ein-jupyter.el: pull more frequent for server start output. 2017-10-21 22:37:59 +09:00
Benda Xu
56d3a0157f Donot block for process. from the accept-process-output document:
Optional argument PROCESS means do not return until output has been
  received from PROCESS.

If jupyter notebook is fast enough and made all the outputs, at the
time of invoking accept-process-output will block until timeout.

Revert "ein-jupyter: Try waiting for process output before logging in."

This reverts commit 9cae1ba153.
2017-10-21 22:31:19 +09:00
Benda Xu
6a9df3680c lisp/ein-notebooklist.el: add missing '.'. 2017-10-21 22:28:17 +09:00
Benda Xu
adce9b3b24 execute and debug notebooklist-open early. 2017-10-21 22:28:17 +09:00
Benda Xu
c759c9a280 lisp/ein-notebooklist.el: print password explicit in debugging mode. 2017-10-21 22:21:05 +09:00
Sam Steingold
05ba2e257a fix a typo in 34902e1 2017-10-20 14:32:53 -04:00
John Miller
d7e1aece02 ein-company: Make sure matches actually start with right text.
This should address the original problem described in #225.
2017-10-20 12:05:01 -05:00
John Miller
34902e104f ein-company: Avoid completing around punctuation.
For some reason this causes the IPython kernel to return a very large number of
potential matches.
2017-10-20 11:55:31 -05:00
Sam Steingold
0be2524001 add ein:notebook-reconnect-kernel to menu 2017-10-19 12:37:22 -04:00
John Miller
e0e3fac0c4 ein-connect: Missed a couple oref's. 2017-10-03 10:17:47 -05:00
John Miller
c0eabfe2ad ein-notebooklist: Fix possible bug specifying notebook urls
Don't think we were handling https:// url's correctly.

Also some code cleanup in ein-connect; fix longstanding bug in ein:load-files,
and tweak default timeout for starting a jupyter session from within emacs.
2017-10-03 10:04:41 -05:00
John Miller
9cae1ba153 ein-jupyter: Try waiting for process output before logging in.
Wait using `accept-process-output` before trying to look for auth tokens and
logging into the jupyter server.
2017-10-02 10:16:50 -05:00
John Miller
0b79ac056b Merge branch 'test' of git://github.com/heroxbd/emacs-ipython-notebook into heroxdb-test 2017-09-30 16:14:34 -05:00
John Miller
0bc7ab813a ein-inspector: Getting organized, remove cruft. 2017-09-30 16:06:36 -05:00
Benda Xu
745673926a lisp/ein-notebooklist.el: defer notebooklist instead of buffer.
The buffer could be killed after the callback.
2017-09-30 21:34:00 +09:00
Benda Xu
077de69d94 lisp/ein-notebooklist.el: dash is needed to provide -group-by. 2017-09-30 14:35:36 +09:00
John Miller
1ab98b0c9d ein-jupyter: More stable ein:jupyter-server-start
Trying to increase reliability of starting a juptyer server from Emacs. Deferred
is cool, but a pain to understand for this old brain.

Fix some typos in ein-ob and be smarter selecting completion backend when
connecting a python buffer to a jupyter notebook.
2017-09-22 14:31:14 -05:00
John Miller
3fc8d55722 ob-ein: Connect edit buffer to running notebook.
Instead of just enabling auto complete why not just connect to the notebook ala
`ein:connect-to-notebook`?

Update dependencies documented in README.rst

Force version check when starting the jupyter server - ein seems to be easily
confused in this regard.
2017-09-20 14:40:27 -05:00
John Miller
40faf6fa4d ob-ein: More robust editing setup.
Try to do the right thing if a notebook server is not running.
2017-09-19 13:49:31 -05:00
John Miller
1bcc3b87c5 ob-ein: Tap into ein autocompletion for org source edit buffers.
Will try to use ein completion backend configured by user when editing ein
source blocks in org.

Also slightly more robust inspecting in ein_inspector.py
2017-09-19 13:08:13 -05:00
John Miller
15ad1c49c7 ein-notebooklist: Order notebook list by file type.
Order entries in notebooklist by file type (i.e. file extension). Add function
'ein:jupyter-server-stop to 'kill-emacs-hook.

Fixed link in documentation.
2017-09-12 16:22:19 -05:00
John Miller
213cea559e ein-jupyter: Add timeout to ein:jupyter-server-start
Add configurable timeout (see `ein:jupyter-server-run-timeout`) that will
hopefully abort calls to `ein:jupyter-server-run` that hang; this is to help
with issues like those reported in #176.

Also update documentation, dependencies in preparation for 0.13.0 release.
2017-09-03 10:29:54 -05:00
John Miller
606d4b3214 Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook
Also update loaddefs and add an additional option for ein's completion backend:
`ein:use-custom-backend'. When enabled EIN will not automatically use any
autocompletion mechanism, instead leaving the configuration details to the user.
2017-08-10 14:53:46 -05:00
John Miller
85968e476c ein-jedi: Truly integrate jedi into ac backend.
Until now autocompletion was using kernel complete mechanism regardless of
`ein:completion-backend' setting.
2017-08-03 08:50:07 -05:00
Sam Steingold
d9c9d18fd0 do not load ein-ac for those who want to use company 2017-08-02 10:15:38 -04:00
John Miller
d201dfadc4 Doc, dependency updates. Tweaks for Emacs 24 compatibility. 2017-07-30 11:37:44 -05:00
John Miller
4419818dde Merge branch 'back-to-eieio' 2017-07-29 23:08:35 -05:00
John Miller
4f5f29d351 ein-jupyterhub: Fix websocket connects.
Made sure to add the right cookies to the websocket request. Websockets
authenticate and everything is peachy now.
2017-07-25 16:57:32 -05:00
John Miller
9a1579d5f6 ein-jupyterhub: Support contents api
When running against jupyterhub master (which will someday be v0.8) can know log
in and make calls to the contents api.

Everything is working except for opening websocket connections.
2017-07-25 15:36:07 -05:00
John Miller
b68d8eff8f ein-jupyterhub: Make `ein:jupyterhub-connect' interactive
`ein:jupyterhub-connect' is now interactive and will query for url, user, and
password before trying to authenticate in Jupyterhub and start a server for the
user.
2017-07-21 17:39:01 -05:00
John Miller
1658e09749 ein-jupyterhub: authorize, start a server and try to open it.
We can do all of these through the function `ein:jupyterhub-connect'. Everything
works great until we actually try to access the running notebook server at which
point the hub redirects us to the login page. I've bumped to the mailing list,
we will see if anyone there can help.
2017-07-21 17:25:35 -05:00
John Miller
e2078e8951 ein-jupyterhub: Code to authroize a user with jupyterhub.
`ein:jupyterhub-connect' will take a url for the jupyterhub server, a user, and
a password and then get and store the authorization token for that user.

Big things on the way!
2017-07-21 12:36:07 -05:00
John Miller
21925e8122 ein-jupyterhub: Early success getting version and authentication token
Some initial success querying jupyterhub for the version and getting an
authentication token for a user.
2017-07-20 18:25:40 -05:00
John Miller
6911f6c692 Merge branch 'master' into jupyterhub 2017-07-20 07:13:32 -05:00
John Miller
96ae9f8316 Merge branch 'master' into back-to-eieio 2017-07-16 19:38:31 -05:00