Commit graph

2654 commits

Author SHA1 Message Date
dickmao
0c6e37c8e0 Normalize url-or-port
```
"http://localhost:8888"
"http://localhost:8888/"
"http://127.0.0.1:8888"
"http://127.0.0.1:8888/"
"8888"
8888
```

Ideally these should converge to the same thing.  Since many hash
tables are keyed off `url-or-port`, forgetting to
normalize `url-or-port` with `ein:url` leads to missed cache hits and
general malaise.  So we try to do that.

Address a FIXME: apply callbacks to `ein:notebook-list-login-and-open`.

Removed py3.5 from travis build matrix to reduce developer strain.
2018-10-13 13:09:53 -04:00
dickmao
c106ea19a5 master should pass the test again 2018-10-13 13:09:17 -04:00
John Miller
c40f41bd6f Shortcut to run integration and functional testing without compile check. 2018-10-13 07:17:44 -05:00
dickmao
c424f2ae5a workaround for emacs-26.1 travis
Delete the org-plus-contrib dependency in Cask via a fast switcheroo
in install-cask.sh
2018-10-12 21:55:33 -05:00
dickmao
24896798dd emacs-26.1-travis cannot see julia-mode
For whatever reason, emacs-26.1-travis consistently fails to download an ess
dependency.
`Dependency ess failed to install:
https://melpa.org/packages/julia-mode-20180816.2117.el: Bad Request`
Remove emacs-26.1 from the build matrix until I figure this out.
2018-10-12 21:55:33 -05:00
dickmao
bc10cea743 Normalize url-or-port
```
"http://localhost:8888"
"http://localhost:8888/"
"http://127.0.0.1:8888"
"http://127.0.0.1:8888/"
"8888"
8888
```

Ideally these should converge to the same thing.  Since many hash
tables are keyed off `url-or-port`, forgetting to
normalize `url-or-port` with `ein:url` leads to missed cache hits and
general malaise.  So we try to do that.

Address a FIXME: apply callbacks to `ein:notebook-list-login-and-open`.

Removed py3.5 from travis build matrix to reduce developer strain.
2018-10-12 21:55:33 -05:00
John Miller
af405dddb7 ein-notebooklist: Document ein:populate-hierarchy-on-notebooklist-open. 2018-10-12 20:51:32 -05:00
John Miller
c51134fa65 ein-notebooklist: Make hierarchy query optional.
Via the `ein:populate-hierarchy-on-notebooklist-open' variable, which we need to
document stat.
2018-10-12 15:32:51 -05:00
John Miller
7bc6e88e5c ein-query: More debug messages, try harder not to get stuck.
Logging to see what the heck is going on, and something of a failsafe to
continue execution in the case things get really stuck.
2018-10-12 15:31:33 -05:00
John Miller
44f7da5b73 Remove AltairTutorial
Not sure why I was keeping this around in the remote repository, to be honest.
2018-10-12 15:29:33 -05:00
John Miller
0212845c6d ein-query: Fix syntax error in loop.
Also tuning as stress testing is showing some problems with my intial solution.
2018-10-12 14:03:22 -05:00
John Miller
b36f33e76c ein-query: Fix #345.
This should keep too many calls to `request' from occurring at the same time.
Not sure I like blocking while waiting for previous calls to terminate, but for
the moment this seems the easiest solution without going the full deferred route
on `ein:query-singleton-ajax' and wrapping calls with semaphore checks via
concurrent.
2018-10-12 11:34:44 -05:00
John Miller
5e7548d457 Prettify indentation in ein-contents.el
I work mostly from laptops with small screens and long function calls all on one
line can be hard to read, so I split things up a bit.
2018-10-12 11:33:20 -05:00
John Miller
1bdb1a26f2 Reimplement PR #344
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.
2018-10-12 10:58:59 -05:00
John Miller
3c84bc2ff5 Fix for #347. 2018-10-12 10:34:04 -05:00
John Miller
98ce6cc83e
Merge pull request #342 from dickmao/async-staging
Asynchronize all server communication
2018-10-07 21:35:47 -05:00
dickmao
3f1d9f3737 ein:flatten runs out of stack on big directories; also don't wait on files 2018-10-07 03:15:49 -04:00
dickmao
11c2245c41 Asynchronize all server communication
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
2018-10-07 00:40:48 -04:00
John Miller
c5814ce422
Merge pull request #339 from dickmao/undo-staging
Implement undo
2018-10-02 11:58:08 -05:00
dickmao
ad8408dfb7 Implement undo
`M-x customize-group RET ein`
Toggle `Ein:Worksheet Enable Undo`
Save for Future Sessions
Restart emacs or kill/restart notebook

Fixes #338
2018-10-02 10:00:25 -04:00
John Miller
1c962cefb3
Merge pull request #337 from dickmao/revive-unit-tests
avoid ipython 7.0.x for now
2018-09-29 15:06:42 -05:00
dickmao
ff3138b33e avoid ipython 7.0.x for now 2018-09-28 19:40:17 -04:00
John Miller
0793b689e9 Merge remote-tracking branch 'dickmao/revive-unit-tests' 2018-09-28 12:08:10 -05:00
John Miller
3d3503289f Try to make ein:company-backend loading more robust.
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.
2018-09-28 11:51:57 -05:00
dickmao
ec28cbe708 revive tkf tests
`make test-unit`
`make test-int` (formerly `cask exec ert-runner`)
An intermittent travis-melpa issue is solved by gonewest818.
2018-09-27 00:52:00 -04:00
John Miller
637deaaeb1 Fixing typos. 2018-09-18 22:13:43 -05:00
John Miller
b94a8cf0d3 Update documentation.
Preparing for version bump.
2018-09-18 22:05:44 -05:00
John Miller
a3482660a2 Support eldoc.
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.
2018-09-18 21:48:07 -05:00
John Miller
8adc38ae8f Code cleanup.
Get rid of some unused variable warnings, add some lexical-binding definitions
and update some documentation.
2018-09-18 21:46:35 -05:00
John Miller
1122c88e0d Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook 2018-09-09 09:51:52 -05:00
John Miller
4d9c05f2dc Maybe fix for #334
ein wasn't using the correct protocol for "inspect_request" messages for recent
versions (>5.0) of the protocol.
2018-09-09 09:44:59 -05:00
John Miller
6634540063
Merge pull request #333 from sam-s/master
add ein:worksheet-kernel-status
2018-09-05 09:51:35 -05:00
Sam Steingold
143267cf06 add ein:worksheet-kernel-status 2018-09-05 09:50:12 -04:00
Sam Steingold
f2396e6ebe simplify code 2018-09-05 09:50:12 -04:00
Sam Steingold
0cc585f7f2 remove a spurious "}" in help 2018-09-05 09:50:12 -04:00
Sam Steingold
bdcfa149ab untabify and fix indentation 2018-09-05 09:50:12 -04:00
John Miller
6cf17bfc92
Merge pull request #331 from sam-s/master
fix typos in the last patch
2018-09-04 09:47:53 -05:00
Sam Steingold
5cb717a9c2 fix typos in the last patch 2018-09-04 10:35:35 -04:00
John Miller
7320c16b47 ein-company: Function annotations via oinfo db
As ein builds completions for company it will build a database of object-info
data that can later be used for function annotations.
2018-09-03 16:06:15 -05:00
John Miller
8b7f26d668 Refactor object info for company annotations. 2018-09-02 23:24:21 -05:00
John Miller
93ab152148
Merge pull request #329 from sam-s/master
ein:console-executable-get: fail if console executable was not found
2018-08-31 11:14:08 -05:00
Sam Steingold
691938ee81 ein:console-executable-get: fail if console executable was not found 2018-08-30 16:38:07 -04:00
John Miller
c648424389 Fix #297.
Raise an error if the user does not specify the port or the full URL when
calling functions like `ein:notebooklist-open' and `ein:notebooklist-login'.

It can be debated that ein should assume http over https if the user doesn't
specify, but I currently think it shouldn't. Debate me.
2018-08-29 17:32:09 -05:00
John Miller
532a92aa49 Fix for #328. 2018-08-29 15:27:03 -05:00
John Miller
b1bceaa063
Merge pull request #327 from xor-xor/fix-gc-threshold-bump
Fix for bumping gc-cons-threshold while opening notebooks
2018-08-26 10:56:40 -04:00
Tomasz Mieszkowski
c7d77ec2f5 Fix for bumping gc-cons-threshold while opening notebooks
Make `ein:gc-prepare-operation` idempotent and add missing call to
`ein:gc-complete-operation` - without it, each subsequently opened notebook
bumps gc threshold to a higher and higher value, effectively disabling all
garbage collection and seriously degrading overall performance.
2018-08-25 21:10:19 +02:00
John Miller
1110649244 Merge branch 'master' of github.com:millejoh/emacs-ipython-notebook 2018-08-25 13:26:11 -05:00
John Miller
91d78370d3 EIN, Company, Jedi, and connected buffers
Not sure if it is really doing anything, but ein:use-company-jedi-backend is now
a valid setting for ein:completion-backends.

More useful is that connected buffers now use ein's company completeion backend,
so completion should now work across all backends all across ein. Now let's get
something working in org!
2018-08-25 13:41:09 -04:00
John Miller
c65c21403e Improving ein-company
Code for getting matches uses deferred and calls to `ein:completer-complete',
avoiding the hacks needed with `ein:completer-finish-completing-company' (names
are shorter too!). Using deferred makes reading the code a bit easier, I think.

EIN will also try to prepare function annotations via the python oinfo object.
Performance is not ideal when the completion candidate list is long, so there is
a new customizable variable `ein:allow-company-annotations' to control this
behavior.
2018-08-25 12:45:50 -04:00
John Miller
658787dfc1 Some utility functions in case we ever try to implement capf.
Some functions to find the beginning and ending positions of the python symbol
at point - we might need this if we ever try to implement support for
capf (completion at point function).
2018-08-25 12:25:05 -04:00