Commit graph

1261 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
John Miller
4a487ab9b8 ein-notebooklist: New function ein:notebooklist-change-url-port
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.
2017-05-24 09:53:58 -05:00
John Miller
b39634d64a ein-org: Fix add link feature for modern org mode.
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'.
2017-05-24 08:32:59 -05:00
John Miller
3697273a84 slideshow: Clean up variable names (no more underscores). 2017-05-22 08:02:42 -05:00
Dov Grobgeld
6b752fd32b Update ein-cell.el
Fixed typo.
2017-05-18 22:22:40 +03:00
John Miller
c97c85eae8 ein-cell-output: Remove duplicate code. 2017-05-18 10:17:10 -05:00
John Miller
4b92b3adcc ein-kernel: Support (anew) starting kernels in older versions of jupyter.
Overzealously looking to the future was my sin here.
2017-05-18 09:04:49 -05:00
John Miller
f2b138b4f7 ein-file: Remove unused code. 2017-05-17 20:14:23 -05:00
John Miller
d9c77492d6 Balancing parenthesis. 2017-05-16 15:07:14 -05:00
John Miller
4f4cfa8f0a Ensure new cells have metadata set. 2017-05-16 14:34:40 -05:00
John Miller
43a1afe49b Preserve metadata information when saving.
EIN should now respect when other actors (namely nbextensions) set metadata for
a cell.
2017-05-16 13:55:43 -05:00
John Miller
db07da61d3 ob-ein: Always return full uri's for sessions, even if only port has been given. 2017-04-26 21:09:39 -05:00
John Miller
461e400c9d ob-ein: Handle full uri's in :session argument.
Correctly handle full uri's when they are provided as a :session. Also ob-ein
converts :session arguments that just specify the port into full uri's.
2017-04-26 21:09:39 -05:00
John Miller
5ed0b871ce ein-file.el: handle text encoding on windows
Try to sanely decode text on windows sytems to avoid getting a buffer full of ^M
EOL symbols when opening files through ein's notebooklist buffer.

This doesn't appear to be necessary on Unix systems, and by extension I am going
to assume it is also the same on Mac OS X.
2017-04-21 20:29:19 -05:00
John Miller
5c2f34ceeb Implement company locate command.
ein company backend now dutifully looks for the file and line where an object is
defined when company so asks it. When ein fails in its duty it fails silently
and I am not sure yet if that is the correct behavior. For now it will stand,
until I think of something better.
2017-04-21 19:07:16 -05:00
John Miller
91b5f605ee Implementat company doc-buffer command.
ein company backend will now show results of inspect_request in a company
documentation buffer when company requests documentation via the doc-buffer
command.
2017-04-21 17:57:16 -05:00
John Miller
ab106032a8 Fixing bug in company backend.
The backend was working properly only when completing at the beginning of the
lines. For example, completing `import IPython.` would end up replacing the
import and moving IPython to the beginning of the line. EIN's company backend no
longer does this.
2017-04-20 19:55:00 -05:00
John Miller
3aac45257c Cosmetic tweaks to ein-company.el 2017-04-20 16:33:56 -05:00