Commit graph

2437 commits

Author SHA1 Message Date
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
John Miller
f47f020336 Merge pull request #229 from sam-s/master
do not load ein-ac for those who want to use company
2017-08-03 08:29:30 -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
John Miller
cda6143270 Document new variable ein:completion-backend.
Also fix some typos and update documentation for related functions.
2017-07-14 21:10:19 -05:00
John Miller
b855d0bfd4 Merge branch 'master' into documenting 2017-07-14 20:56:15 -05:00
John Miller
08d2792d69 Better interface for customizing code completion in ein.
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.
2017-07-14 19:53:14 -05:00
John Miller
e8d950ed99 Hard to have a mascot without an image of said mascot.. 2017-07-12 15:52:09 -05:00
John Miller
b2eb5e5b06 Introducing EIN, EIN's official mascot.
Because that is what we all really needed and were waiting for. I only wonder
why it took so long for this to occur to me.
2017-07-12 15:42:16 -05:00
John Miller
24b5ee1cd1 ein-classes: Factor out class and struct definitions.
Try to clean up the dependency heck amoung ein's many files.
2017-07-12 15:05:48 -05:00
John Miller
c78711a7c4 Back to eieio
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...)
2017-07-12 14:38:04 -05:00
John Miller
5809ecc93a Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook 2017-07-11 18:24:54 -05:00
John Miller
3b4ed3a812 Merge pull request #227 from sam-s/master
trivial cosmetic changes
2017-07-11 18:22:07 -05:00
Sam Steingold
2ccf47cd75 remove unused declaration 2017-07-11 14:32:18 -04:00
Sam Steingold
d447c8cc15 typos 2017-07-11 14:32:00 -04:00
John Miller
398727efe4 Cask: Update new package dependencies. 2017-07-06 17:13:46 -05:00
John Miller
b2fd06eeed Merge branch 'master' into jupyterhub 2017-07-06 12:56:42 -05:00
John Miller
aebdbc1eb8 ein-cell: Fix saving images in worksheets.
Images weren't being save to json in the way they should have. Mostly had to do
with how the attirbutes were being ordered. This is still, unfortunately, a
nasty bit code but it still seems to work.
2017-06-30 21:41:16 -05:00
John Miller
d3a40af574 Add auto-complete as a required dependency.
It seems that in some instances EIN is failing to install on emacs installations
that do not have auto-complete, so for the moment I am making auto-complete a
required package.

If this causes you a problem please log an issue on the project issues page
(https://github.com/millejoh/emacs-ipython-notebook/issues) and let me know
what is happening on your system.
2017-06-16 13:17:11 -05:00
John Miller
ec8b974f23 Merge pull request #216 from sam-s/master
mention skewer-mode and deferred as requirements
2017-06-16 10:11:58 -05:00
Sam Steingold
ac597cffe5 mention skewer-mode and deferred as requirements 2017-06-13 09:33:13 -04:00
John Miller
9386b6f578 Introduce skewer-mode dependency
I swear I though I was on another branch when I commited the dynamic javascript
stuff but, well, nothing to be done now I suppose.

With very basic support for evaluating javascript code now available I am adding
the skewer-mode dependcy as I should have done originally.

Note that yes, one can execute javascript in code blocks with the %%javascript
magic, but don't expect the really cools things like widgets or interactive
visualizations (ala %matplotlib notebook) to suddenly start working.

There is a lot more work to be done here, and possible it will never be possible
to have interactive widgets in the emacs notebook buffer, but I am hopeful that
one day we will at least be able to pop-up a browser window with a widget and
have it "talk" to the emacs notebook buffer.
2017-06-12 16:30:35 -05:00
John Miller
778d58b850 Reintroduce ein-skewer.el
The code was lost, but now it is found.
2017-06-12 11:05:24 -05:00
John Miller
9cfb25379e Merge branch 'master' into dynamic-javascript 2017-06-11 20:30:09 -05:00
John Miller
d9c81f3d90 ein:jupyter: More robust server launching, try for emacs24 compat.
Starting ipython/jupyter notebook servers from EIN should now be more robust.
Will try to detect correct url/port whether or not token authentication is
enabled, and if not will try to alert the user.

Also using `start-process` to run the notebook server - I think this will allow
compatibility with emacs24.
2017-06-06 15:25:44 -05:00
John Miller
c1d263fa13 ein:notebooklist: A faster, better change url.
Make the process of changing URL's via `ein:notebooklist-change-url-port'
smoother and more user-friendly.
2017-06-03 15:45:28 -05:00
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
179cec48ae ein-cell: Fix slideshow metadata.
Was using wrong name for slide type; should be 'slide_type' not 'slide-type'.
2017-06-02 15:05:21 -05:00
John Miller
0196407b42 ein-core: More stable ipython version checking.
Try to be more graceful when a null sneaks in for the server version. Also
experiment using deferred:$ in `ein:jupyter-server-start'.
2017-06-02 07:24:08 -05:00
John Miller
1bbaf7600c Merge branch 'master' into dynamic-javascript 2017-05-30 21:00:26 -05:00
John Miller
76fa9421dc Delete png files. 2017-05-30 14:47:31 -05:00
John Miller
22cc948975 ein:notebooklist-change-url-port: Better deferred syntax, use lexical bindings. 2017-05-30 14:33:31 -05:00
John Miller
e3eca1115d ein-notebooklist: Avoid auth issues when changing host url.
When calling `ein:notebooklist-change-url-port' first make call to
notebooklist-open to ensure cookies are properly created/refreshed before trying
to save notebook and restart kernels.

Note this uses a bit of magic from deferred, which was already being used in
ein-jedi.el, but somehow never made it into the list of required pacakges. We
are now correcting that oversite.

Extend the timeout when querying the ipython/jupyter version. Also try to detect
when timeouts occur and in such cases temporarily assume a version (4 for the
moment).
2017-05-30 14:05:02 -05:00
John Miller
8a231bfb2d ein-loaddefs: Update autoloads. 2017-05-24 09:58:14 -05:00