Commit graph

2944 commits

Author SHA1 Message Date
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
Sam Steingold
7b96d74115 defsubst must be defined before its first use 2019-10-26 19:39:25 -06:00
Tomasz Mieszkowski
876cba2049 Update CONTRIBUTING.md 2019-10-24 07:16:09 -06:00
John Miller
0c207dfac1 Revert emacs 25 version, tool for downloading travis logs.
Update help message in travis as well. Get rid of case-fold check for the
moment. It works fine locally, but travis can't seem to wrap its head around the
test.
2019-10-20 13:34:51 -06:00
John Miller
4c923f9a1f Update required version of websocket. 2019-10-20 13:34:51 -06:00
John Miller
e0900ac745 It's a bit fiddily, but seems to get the job done.
Testing for breakage with case-fold-search is set to nil (see issue #600).
2019-10-20 13:34:51 -06:00
John Miller
86c034997e Rework loop to avoid warning about unused lexical variable. 2019-10-12 08:37:46 -05:00
John Miller
940387b17b Use correct add-function syntax with lexical variables. 2019-10-12 08:37:46 -05:00
John Miller
21693f9b08 Clean-up unused lexical variable warnings. 2019-10-12 08:37:46 -05:00
John Miller
f232c45fdb Simulating human interaction from the machine is not easy. 2019-10-12 08:37:46 -05:00
Sam Steingold
448e161068 Avoid dependency on the deprecated package "cl"
Replace `defun*' with `cl-defun', `loop' with `cl-loop',
  `case' with `cl-case', `assert' with `cl-assert',
  `destructuring-bind' with `cl-destructuring-bind',
  `multiple-value-bind' with `cl-multiple-value-bind',
  `equalp` with `cl-equalp`, `defstruct' with `cl-defstruct`
  &c &c &c
Use lexical-binding instead of lexical-let.
Add declarations and defvar to avoid breakage.
2019-10-12 08:37:46 -05:00
John Miller
f49b2559d6 Company completion popups may be corrupting the connect.py buffer.
Hard to reproduce exactly what is happening, but try to work around the
possibility of a company completion popup appearing in the buffer or minibuffer.
2019-10-06 18:05:36 -05:00
Miller
77e45bf77d Play with emacs and python versions. 2019-10-06 18:05:36 -05:00
Miller
44d650dd02 Use latest jedi for testing.
Version 0.15.x seems to have resolved the issues that plagued 0.14.
2019-10-06 18:05:36 -05:00
Miller
e7815780d5 Include IPython magics in the syntax table.
The % character should be part of the symbol, just as _ as . are.
2019-10-06 18:05:36 -05:00
Miller
58db03836c company-backends is a buffer-local variable
We have to be careful about setting it globally because that seems to be causing
some conflicts, better to set it at the buffer level when we are opening a
notebook otherwise ein:company-backend may not be activated.
2019-10-06 18:05:36 -05:00
Miller
d3591e011a Improvements to company backend.
- Make sure we only cache actual python objects.
- Do better when we are completing in the middle of an object.

To that end is the new function `ein:object-prefix-at-point' that returns the
prefix for the dotty.thing.at.point. See the function documentation for more
info.
2019-10-06 18:05:36 -05:00
John Miller
ef92e574b2 Support julia in multilang.
Doesn't break travis, but it is causing problems in my local linux setup.
2019-10-05 22:15:39 -05:00
John Miller
8abb37f844
Merge pull request #592 from dickmao/nix
Follow-up customizable default kernel; make ob-ein usable
2019-10-03 15:04:35 -05:00
dickmao
463cb5dd6c test-ob-ein-recurse 2019-10-01 12:13:29 -04:00
dickmao
bcf498929b redundant wheel install 2019-09-30 18:45:33 -04:00
dickmao
b3179a12d1 ein:notebooklist cannot see ein:jupyter-default-server-command on startup.
move default-kernel defcustom to ein:jupyter
2019-09-30 18:36:01 -04:00
John Miller
0fe1dbfe2e
Merge pull request #590 from dickmao/nix
Customizable default kernel; make ob-ein usable
2019-09-30 08:34:21 -05:00
dickmao
ed4522b787 ob-lang cannot require org
Generally, ob-lang modules cannot require org, else it gets into
infinite require loop.

This begs the question whether ob-ein is really used by anyone.
2019-09-29 17:16:25 -04:00
dickmao
507eaf4d9a fix NPE in poly-ein (revealed in ESS) 2019-09-29 12:19:46 -04:00
dickmao
189b89fb6c give purcell/nix-emacs-ci a spin 2019-09-29 12:19:36 -04:00
dickmao
e4e04fdc3d Specifying default kernel
```
M-x customize-group RET ein
Select Ein:Notebooklist-Default-Kernel
```

Closes #82
2019-09-29 12:19:10 -04:00
John Miller
5f51de4c80 Fix travis regression. 2019-08-20 11:01:49 -06:00
John Miller
e1f19aba76 Merge branch 'clojure' of https://github.com/pdenno/emacs-ipython-notebook into pdenno-clojure 2019-08-18 15:23:03 -05:00
John Miller
a2872eff6c
Merge pull request #582 from dickmao/doc-issue-580
Clarification of readme
2019-08-13 20:57:23 -05:00