Commit graph

2260 commits

Author SHA1 Message Date
John Miller
88595dede6 Support filetypes other than ipynb
EIN now lists other file types in notebooklist buffer and will allow user to
open those files for editing. The new buffer will get the right major-mode most
of the time, but has a hard time getting the line coding right on Windows
platform.
2017-04-20 07:47:05 -05:00
John Miller
06269b72bb Update autoloads for ein-company.el 2017-04-19 10:57:19 -05:00
John Miller
d13e85b370 Minimally functional company-mode support.
There is now a company mode backend for ein. It generates completions by sending
complete_request to the running kernel so for the moment no jedi integration.

Configuring is maybe non-obvious - user should at minimum set
`ein:use-auto-complete` and `ein:use-auto-complete-superpack` to nil. Adding a
`(require 'ein-company)` probably should be done somewhere in the user's init
file. This could all be done better so I will attempt to address in later
commits.
2017-04-19 10:12:45 -05:00
John Miller
63b064cc33 Merge branch 'company-mode-support' into company-async-complete-ng 2017-04-18 17:49:46 -05:00
John Miller
f0f0c0d206 Typos, more efficient kernelspec querying.
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).
2017-04-11 17:09:30 -05:00
John Miller
39f5d329f1 Functional tests start jupyter using ein:jupyter-server-start
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??
2017-04-07 08:18:41 -05:00
John Miller
64267aca7d ein:notebookupdate-url-or-port: Allow user to change a notebook's url-or-port
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.
2017-04-03 20:49:51 -05:00
John Miller
d189d8b924 Implement uploads per #170. 2017-04-02 14:33:56 -05:00
John Miller
e88f7f3d5f Fix for #188.
Make even more unique edit-cell buffer names. Check that an edit-cell-buffer
does not already exits before creating one.

Also try to be even more aggressive in limiting output in backtraces when
debugging ein.
2017-04-02 08:59:02 -05:00
John Miller
2547226f2e Merge pull request #186 from cpbotha/cpb-kernel-in-ein-cell-edit
ein:get-kernel works in edit-cell-mode
2017-03-22 08:50:10 -05:00
Charl P. Botha
61ba1e9a30 ein:get-kernel works in edit-cell-mode
Modify ein:get-kernel so it can retrieve the kernel from the local
worksheet variable in edit-cell-mode. This is done so that functions
such as ein:completer-complete and tooltips / inline help are
availeble to be bound by the user.
2017-03-22 12:22:36 +02:00
John Miller
12e522c05f Merge pull request #185 from jschwab/fix-184
Add guard to allow for links in older org-mode versions
2017-03-20 14:22:54 -05:00
Josiah Schwab
68cc6f59b0 Add guard to allow for links in older org-mode versions 2017-03-20 11:26:04 -07:00
John Miller
80fc8b1f7d Fix for #181.
Only enable ein:pager-mode for pager buffers that don't already have the mode
enabled.
2017-03-19 13:19:01 -05:00
John Miller
8cb69fe4e7 Update to latest sessions API
Set POST body during session creation per
http://jupyter-api.surge.sh/#!/sessions/get_sessions.
2017-03-16 22:28:17 -05:00
John Miller
095d758670 Even more cl-generic-ification. 2017-03-16 16:55:10 -05:00
John Miller
b195fbdd70 ein-traceback has been cl-generic-ified. 2017-03-16 16:42:03 -05:00
John Miller
0ea4a9adef Cleaning up compile warnings.
Slowly move towards cl-generic instead of EIEIO.

Got rid of json encoding defadvices. So far so good.
2017-03-16 16:16:16 -05:00
John Miller
fdb20813cf Give another try at company-mode integration. 2017-03-04 21:25:21 -06:00
John Miller
68b2e94a75 Merge branch 'master' into company-mode-support 2017-03-04 21:23:17 -06:00
John Miller
0a958b0f36 What is going on? 2017-03-04 21:21:29 -06:00
John Miller
0d328470b3 What a waste of a commit. 2017-03-04 21:07:52 -06:00
John Miller
7cff07321a Whitespace cleanup. 2017-03-04 20:57:37 -06:00
John Miller
1d82941c98 Bump versions for dependencies. 2017-02-25 21:40:49 -06:00
John Miller
4578772ff1 Merge pull request #180 from neuschwanstein/master
Fix for the copy cell feature
2017-02-24 13:15:27 -06:00
Thierry BM
740c1ca999 Fix for the copy cell feature 2017-02-23 19:14:01 -05:00
John Miller
40af5bf381 Merge pull request #179 from sam-s/master
extract ein:pytools-jump-to-source-1 from ein:pytools-jump-to-source
2017-02-23 08:59:14 -06:00
Sam Steingold
ac74ff8868 extract ein:pytools-jump-to-source-1 from ein:pytools-jump-to-source
Check that `filename` actually exists before jumping to it.
Without this patch M-. on an arbitrary word ZZZ creates two empty buffers,
one named "None" and the other named (yes, this is the actual buffer name):
"code.py:456: UserWarning: Argument given (ZZZ) can't be found as a variable or as a filename."
2017-02-22 11:03:24 -05:00
John Miller
6b7e251658 Allow user to specify additional arguments to start the jupyter server.
See customizable variable `ein:jupyter-server-args'.
2017-02-20 18:07:17 -06:00
John Miller
3fc73b98d8 Attempt at workaround for curl cookie jar issues
Login and notebooklist requests have a tendency to fail with the curl request
backend when there is no cookie jar file. Request will create the cookiejar, but
apparently with the asynchronous nature of ein this happens too slowly causing
content REST queries to fail. My tactic here is to repeat the call once, and
only once when a failure is detected. It is a difficult problem to reliably
create so I'm not sure if this is a good fix or not. Time will tell.
2017-02-17 15:06:59 -06:00
John Miller
9e1341a704 Better documentation for a better user experience.
And better jupyter server launching...
2017-02-16 16:57:37 -06:00
John Miller
06fbab9058 Preparing for a version bump. 2017-02-16 09:19:40 -06:00
John Miller
58d8142d0a Numerous documentation updates.
Get rid of ein-sections: you are not yet ready for the world young man!
2017-02-16 09:01:14 -06:00
John Miller
900d7b4375 Add some customiable variables for controlling ein:jupyter-server-start 2017-02-16 08:11:58 -06:00
John Miller
04061c968a Git rid of explicit use of mocker
Per #175 make mocker a dependency via Cask and avoid keeping an copy around in
the repository.
2017-02-15 19:39:45 -06:00
John Miller
4ccaa9337c Allow keepalive to be automatically enabled.
When the customizable variable `ein:enable-keepalive` is non-nil EIN will
automatically call `ein:notebooklist-enable-keepalive` when calling
`ein:notebooklist-open`. Keepalive has also been tweaked to make sure it does
not create multiple timers.
2017-02-15 19:33:35 -06:00
John Miller
6b4af7e7f7 Merge remote-tracking branch 'refs/remotes/origin/master' into matplotlib-inspector 2017-02-15 19:01:30 -06:00
John Miller
fc3f24deb2 Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook 2017-02-15 19:00:37 -06:00
John Miller
4061a58c94 John discovers M-x update-directory-autoloads
Hope this does what I mean it to do..
2017-02-15 18:58:30 -06:00
John Miller
5c9ff051c8 Merge branch 'matplotlib-inspector' 2017-02-15 18:46:51 -06:00
John Miller
bbfd97eacf Merge pull request #177 from arthurcgusmao/master
Update README.rst
2017-02-15 16:55:54 -06:00
John Miller
41f1513ac7 Forgot to specify autoload for the server commands. 2017-02-15 15:06:38 -06:00
John Miller
191d27c3ac Make stopping a jupyter server more user-friendly.
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.
2017-02-15 15:02:07 -06:00
John Miller
05bd6c010b Support for starting and stopping the notebook server from emacs.
For the moment we only support current version of jupyter (i.e. 4.3.1 or
greater).

The special commands are `ein:jupyter-server-start` to start a notebook server
and `ein:jupyter-server-stop` to, clearly, stop a notebook server.

On starting a server EIN will try to determine the url and token for accessing
the notebook server, login and open the notebook list automatically.
2017-02-15 14:18:16 -06:00
Arthur Colombini Gusmão
5ab925ef68 Update README.rst
Changed description of manual installation in "usage" section.
Made it more explicit that you only need to manually put files in
the load path when not using MELPA.
2017-02-15 02:36:51 -02:00
John Miller
ed633b1fd7 Functional tests that handle redirects. 2017-02-14 21:01:25 -06:00
John Miller
f1d3fbe967 More stable notebooklist updates.
Adding a slight pause (sit-for, where have you been all my life?) after session
queries seems to make notebooklist buffer updates much more stable.
2017-02-12 22:16:44 -06:00
John Miller
a4f9128182 Steps towards sections. More stable notebooklist buffers.
Initial steps integrating magit's sections into ein. Also an attempt to make
notebooklist buffers more "stable" by adding a slight pause during session
queries.
2017-02-12 22:09:44 -06:00
John Miller
f5f4d5c04f Merge branch 'master' into matplotlib-inspector 2017-02-09 11:58:31 -06:00
John Miller
faf61c3cc3 Fix bug that was preventing cell edit's from saving.
Bad bug! No pudding for you!
2017-02-09 11:56:51 -06:00