When I attempt to use Elpy's autocomplete in EIN notebooks, if I continue typing the name of an autocompleted symbol after the autocompletion has started, the symbol ends up totally garbled. In particular, it appears that the letters from the autocompletion are not removed/deleted as I continue typing, and the new autocompletion for the remaining letters keeps showing up (with highlighting). Furthemore, it is not possible to delete these autocompleted and highlighted letters. To get them to disappear, the notebook must be closed and reopened.
Steps to reproduce the problem
From a clean init.el, install Elpy and EIN using package-install.
Call elpy-enable.
Create a new python file (say, elpy_test.py). This is to set up Elpy.
When prompted to install dependencies for completion etc. in the Elpy RPC virtual environment, answer yes.
Call ein:run and create a new notebook.
Get autocompletion to start. For example, you can type import itertools in the first cell, execute it, then start typing itertools in the next cell.
Continue to type the autocompleted name (itertools in our example). The garbled autocompletion will appear. Even if you delete the rest of the symbol name, the autocompleted letters will remain.
[I 12:05:12.433 NotebookApp] Serving notebooks from local directory: /Users/tristamc/.emacs.2.d
[I 12:05:12.434 NotebookApp] Jupyter Notebook 6.1.3 is running at:
[I 12:05:12.434 NotebookApp] http://localhost:8888/?token=6e82bd7576aaddc5949deaa2ca3e9aa7a52c98e30655054e
[I 12:05:12.434 NotebookApp] or http://127.0.0.1:8888/?token=6e82bd7576aaddc5949deaa2ca3e9aa7a52c98e30655054e
[I 12:05:12.434 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:05:12.448 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/tristamc/Library/Jupyter/runtime/nbserver-94022-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=6e82bd7576aaddc5949deaa2ca3e9aa7a52c98e30655054e
or http://127.0.0.1:8888/?token=6e82bd7576aaddc5949deaa2ca3e9aa7a52c98e30655054e
[W 12:05:13.040 NotebookApp] 403 POST /login (127.0.0.1): '_xsrf' argument missing from POST
[W 12:05:13.123 NotebookApp] 403 POST /login (127.0.0.1) 83.12ms referer=None
[I 12:05:13.145 NotebookApp] 302 POST /login (127.0.0.1) 1.42ms
[I 12:05:13.146 NotebookApp] 302 GET / (127.0.0.1) 0.34ms
[I 12:05:15.690 NotebookApp] Creating new notebook in
[I 12:05:15.884 NotebookApp] Kernel started: f61e52f4-005b-4b1c-ac88-553db82f3444, name: python3
[I 12:05:16.660 NotebookApp] Saving file at /Untitled.ipynb
Square brackets indicate buttons; type RET or click mouse-1 on a
button to invoke its action. Invoke [+] to expand a group, and [-] to
collapse an expanded group. Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.
Problem description
When I attempt to use Elpy's autocomplete in EIN notebooks, if I continue typing the name of an autocompleted symbol after the autocompletion has started, the symbol ends up totally garbled. In particular, it appears that the letters from the autocompletion are not removed/deleted as I continue typing, and the new autocompletion for the remaining letters keeps showing up (with highlighting). Furthemore, it is not possible to delete these autocompleted and highlighted letters. To get them to disappear, the notebook must be closed and reopened.
Steps to reproduce the problem
init.el
, install Elpy and EIN usingpackage-install
.elpy-enable
.elpy_test.py
). This is to set up Elpy.ein:run
and create a new notebook.import itertools
in the first cell, execute it, then start typingitertools
in the next cell.itertools
in our example). The garbled autocompletion will appear. Even if you delete the rest of the symbol name, the autocompleted letters will remain.System info:
Logs:
ein:log-all:
ein server:
Elpy Configuration
Emacs.............: 27.2 Elpy..............: 1.35.0 Virtualenv........: rpc-venv (/Users/tristamc/.emacs.2.d/elpy/rpc-venv) Interactive Python: python 3.8.6 (/Users/tristamc/.emacs.2.d/elpy/rpc-venv/bin/python) RPC virtualenv....: rpc-venv (/Users/tristamc/.emacs.2.d/elpy/rpc-venv) Python...........: python 3.8.6 (/Users/tristamc/.emacs.2.d/elpy/rpc-venv/bin/python) Jedi.............: 0.18.0 Rope.............: 0.18.0 Autopep8.........: 1.5.6 Yapf.............: 0.31.0 Black............: 20.8b1 Syntax checker....: flake8 (/Users/tristamc/.emacs.2.d/elpy/rpc-venv/bin/flake8)
Warnings
Options
Square brackets indicate buttons; type RET or click mouse-1 on a button to invoke its action. Invoke [+] to expand a group, and [-] to collapse an expanded group. Invoke the [Group], [Face], and [Option] buttons below to edit that item in another window.
[+]-- [Group] Elpy [+]-- [Group] Python [+]-- [Group] Virtual Environments (Pyvenv) [+]-- [Group] Completion (Company) [+]-- [Group] Call Signatures (ElDoc) [+]-- [Group] Inline Errors (Flymake) [+]-- [Group] Code folding (hideshow) [+]-- [Group] Snippets (YASnippet) [+]-- [Group] Directory Grep (rgrep) [+]-- [Group] Search as You Type (ido) [+]-- [Group] Django extension [+]-- [Group] Autodoc extension