Commit graph

2973 commits

Author SHA1 Message Date
John Miller
42f8efc54b
Merge pull request #647 from millejoh/fix-cc-mode
c++-mode is not provided anywhere, but cc-mode is.
2020-01-26 19:49:43 -07:00
John Miller
c31580c4c8 c++-mode is not provided anywhere, but cc-mode is. 2020-01-26 12:30:57 -07:00
John Miller
bb97c11d11
Merge pull request #643 from millejoh/hy-multilang
Add multilang support for hy.
2020-01-24 15:40:11 -07:00
John Miller
b0d6dc5ef5 Travis has decided to like python 2 once more. 2020-01-24 12:48:32 -07:00
John Miller
b2d1acc9d5 Issue #644: Add multilang support for xeus-cling
Multilang support for c, c++11, c++14, and c++17. Org babel source blocks are
also support.

Dropping (for a moment) testing against python27 on travis.
2020-01-24 11:16:56 -07:00
John Miller
ae85045d85 Setup multilang hy more like how hy-mode does it.
Also try to work around travis's inexplicable failures with emacs 25.1
2020-01-14 13:51:31 -07:00
John Miller
5496d0d0ec Add multilang support for hy.
Maybe I should write a macro.
2020-01-13 16:31:46 -07:00
John Miller
41d8e61df6 Make travis happy.
Get rid of byte-compile errors, add haskell-mode to development dependencies.
2020-01-04 09:09:41 -07:00
John Miller
c71075328c Correctly process ansi color codes in text output. Multilang haskell.
Caught this while testing julia support.

Bonus change: add multilang support for Haskell.
2020-01-04 09:09:41 -07:00
John Miller
18d329eaad Execute oinfo requests only when kernel is python.
Otherwise we will try to execute python code in a non-python environment. This
doesn't break anythng, but can fill the log with many, many errors.

In the future might be interesting to add language-dependent methods of
generating object information.
2019-12-30 07:14:31 -07:00
John Miller
728ee7c191 Raise undo jigger errors only when debugging is enabled. 2019-12-29 16:06:24 -07:00
John Miller
55a522c806 Imenu items can now include markdown cells that look like headings. 2019-12-29 16:06:24 -07:00
John Miller
00a4af6857
Fix travis osx (#637)
* Stage 1: Go to python 3 for OS X.

* Resolving prompt-toolkit conflict.

Somebody (not sure who) wants prompt-toolkit version to be between 1.04 and
2.00, but jupyter-console needs at least v2.00. First try - use a higher IPython
version.

* Try to force prompt-toolkit version on OS X.

Trying fix suggested in issue #370 (https://github.com/jupyter/jupyter/issues/370).

* Wrong operator for pip install prompt-toolkit.

* Play with IPython version, remove potentially redundant ipykernel install.

* Now we can't find jupyter on OS X.

The install looks good, though.

* Python 3.7.6 is still a release candidate. Sigh.

* Get serious about setting the PATH with pyenv.

* Is the shell set up for pyenv virtualenv?

* ELPA and emacs 25 are not getting along.

* Restarting the shell is a bad idea.

* I suspect the issue is with package gpg signatures.

* Try emacs 26.3 for OS X build.
2019-12-19 11:01:35 -07:00
noonker@pm.me
d48edc71b6 Forgot to remove macro variable 2019-12-16 11:49:24 -07:00
Joshua Person
d5d2cab74f Fixed issue where redirect checker was clobbering url 2019-12-16 11:49:24 -07:00
Sam Steingold
6d0d5898b4 extract ein:jupyter-notebook-list
... from ein:crib-token, ein:crib-running-servers, ein:process-refresh-processes
2019-12-12 17:02:23 -07:00
John Miller
cdf0350de5 Scenario was too generic.
There is another WS action error in the log on travis, unrelated as far as I can
tell.
2019-12-07 17:33:47 -07:00
John Miller
738e50fb1a Better make all the calls to length on buffer-undo-list safe. 2019-12-07 17:33:47 -07:00
John Miller
f36ae22b48 buffer-undo-list can become a dotted list in certain situations.
Unsure what those situations are, but when it happens it breakes ein's undo
facility. Calling `length' on a dotted list will generate wrong-argument-type
errors. To help soften the consequences of those situations we call `safe-length'
instead of `length'.
2019-12-07 17:33:47 -07:00
John Miller
aefa088010 Why define a variable if we aren't going to use it?
Modifying ein:%which-cell% when the cell hasn't changed can lead to an obscure
error.

Also, probably unnecessary, but make sure buffer-undo-list is not t (which is a
valid value for this variable) when unshifting.
2019-12-07 17:33:47 -07:00
John Miller
7f66b95a73 Update version of ein_remote_safe.py 2019-12-01 11:31:00 -07:00
John Miller
2637898215 Fix spelling (freudian?) error. 2019-12-01 11:31:00 -07:00
John Miller
d9866649e2 Unbreak pytools tooltip code. 2019-12-01 11:31:00 -07:00
John Miller
5224031fcc Split large oinfo requests into smaller chunks. 2019-12-01 11:31:00 -07:00
John Miller
193c25b4ce Reduce the number of oinfo calls.
Notebook performance would noticeably suffer when doing completions in large
namespaces (I'm looking at you pandas) because it could result in many (100's)
of individual calls to `__ein_print_object_info_for'. This was very inefficient,
so now what the code does is make a single python call to generate oinfo results
for a list of completion candidates. Performance seems much improved, but only
time will tell if this is just my imagination or not.
2019-12-01 11:31:00 -07:00
John Miller
a338f58329 Add some regression tests for pytools. 2019-11-29 20:19:20 -07:00
John Miller
cccc8a7b11 Only set figure dpi to integer values. 2019-11-28 20:37:51 -07:00
John Miller
7da1f156eb Automate dpi scaling a bit.
You still need to import matplotlib first, but after doing that if you call
`ein:pytools-matplotlib-api-correction' then ein will try to automatically
adjust the figure dpi to something appropriate for the current display. Setting
up the appropriate hooks to get all this to happen automatically upon opening a
notebook is left as an exercise to the user.
2019-11-28 20:37:51 -07:00
John Miller
b82bf127f8 New commands for setting matplotlib configuration.
See new functions `ein:pytools-set-figure-dpi',
`ein:pytools-set-matplotlib-parameter'. Added some tests as well.
2019-11-28 20:37:51 -07:00
John Miller
f76edbbf42
Better consistency with kernel connections in anonymous ob-ein blocks. (#624)
* Better consistency with kernel connections in anonymous ob-ein blocks.

And some tests to try to prove this is the case.

* Make sure company-mode is enabled.

* Undo cursor shifts.

* Company mode still not catching.

* Travis unhappy with undo and anonymous completion.

Tests work locally, but fail on travis. Let's play around a bit.

* Revert undo position jiggers.

I think the issue is character or line ending encoding in WSL (i.e. Windows) and
a "normal" Linux setup.
2019-11-27 08:59:52 -07:00
John Miller
8143321b87
Merge pull request #622 from sam-s/master
add ein:quit to easily exit EIN without killing Emacs
2019-11-25 10:38:49 -07:00
Sam Steingold
0a5b663d23 add ein:exit as an alias to ein:quit and make both autoloaded 2019-11-25 10:14:50 -05:00
Sam Steingold
4afa698c9c ein:quit: call ein:jupyter-server-stop only if it is already present 2019-11-25 10:11:15 -05:00
Sam Steingold
3f275425fd add ein:quit to easily exit EIN without killing Emacs 2019-11-18 10:43:04 -05:00
John Miller
da378d518a
Merge pull request #620 from millejoh/pdenno-clojure
Pdenno clojure
2019-11-17 17:12:40 -06:00
John Miller
6aca94c21b
Merge branch 'master' into pdenno-clojure 2019-11-17 12:30:58 -06:00
John Miller
c8e769183f
Merge pull request #619 from zfc09/file-delete
Implement NBList delete file command.
2019-11-14 22:30:20 -06:00
John Miller
f22b841ed1
Merge pull request #618 from sam-s/master
trivial cosmetic changes
2019-11-14 22:29:28 -06:00
Zeng, Fucen
c2b14d5f26 Implement NBList delete file command. 2019-11-14 17:14:32 +08:00
Sam Steingold
14ba9121d7 trivial cosmetic changes
(ein:notebook-toggle-latex-fragment): avoid compile warning by declaring px-preview
(ein:notebook-restart-session-command): more verbose confirmation question
(ein:notebook-worksheet-delete): squash nested when/unless
2019-11-13 12:44:35 -05:00
John Miller
143b6e3a93
Merge pull request #611 from millejoh/better-completion
ein-completer: Use entire cell/buffer for completion context.
2019-11-13 06:11:05 -07:00
Miller
4c1d472568 Catch other instances of ecukes calls. 2019-11-11 07:26:11 -07:00
John Miller
6b33adcfa5 Completion w/o cell execution only works with ipy versions > 7. 2019-11-11 05:59:17 -07:00
John Miller
12aae1444a Test case for completion without cell execution. 2019-11-10 10:12:19 -07:00
John Miller
7909837bf9
Merge pull request #614 from xor-xor/execute-all-cells
Add commands to execute all cells above/below current one
2019-11-10 09:47:33 -07:00
Tomasz Mieszkowski
9b1d9876bd Add commands to execute all cells above/below current one 2019-11-10 15:40:32 +01:00
Miller
56217bd4ab ein-ipdb: Convenience function to launch ipdb debugger. 2019-11-06 16:38:30 -07:00
John Miller
3aa68f2a00 ein-completer: Use entire cell/buffer for completion context.
The modern Jupyter messaging spec (> 5.0) simplified `complete_request` to allow
sending blocks of text as completion context. EIN now takes advantage of this by
sending the entire contents of the worksheet cell, when in a notebook buffer,
or, when in a non-notebook buffer, the entire contents of the buffer. This
allows backends like jedi to do better context-sensitive completion without
having to execute code. In general this should improve completion behavior,
though may result in an initial performance hit when working in large buffers
while EIN builds the oinfo cache. Note that oinfo (i.e., function call
signatures) will not be available until code in the buffer/cell is executed.
2019-11-04 19:36:24 -07:00
John Miller
91b7375dbf
Issue 608 jedi completion (#609)
* ein-ac: Fail silently for unexpected ein:completion-backend values.

Fixes #608, though we really need a test cases for completion in polymode.

* Only define ein ac-sources when the user explicitly sets the backend.

* Test case for issue #608.

* Only test jedi completion when testing polymode.

* Add epc dependency for emacs-jedi.

* Flanging up with travis is always a challenge.

* Forgot to update the scenario.

* Give jedi time to install.

* Add virtualenv to travis OS X build.

Also add some addition TOX environments for future testing cases.

* OS X travis is failing - is it a timeout issue?
2019-10-28 20:28:37 -06:00
Sam Steingold
c477407500 fix bug #606: defvar for variables defined in ein-jupyter which is not required here 2019-10-26 19:39:25 -06:00