jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.89k stars 261 forks source link

M-x elpy-goto-definitions and M-. lead to different behaviors on emacs 27.1 #1900

Open xuehy opened 3 years ago

xuehy commented 3 years ago

Summary

M-x elpy-goto-definitionand M-.lead to different behaviors on emacs 27.1

Steps to reproduce

With C-h b, M-. is bind to xref-find-definitions and the document says:

If you use an Emacs version superior to 25, Elpy will define the necessary backends for the xref package.

But M-x elpy-goto-definitionand M-.lead to different behaviors. The result of M-x elpy-goto-definition seems more accurate.

My configuration

OS

macos big sur 11.2.1

Result of (elpy-config)

Elpy Configuration

Emacs.............: 27.1
Elpy..............: 1.35.0
Virtualenv........: None
Interactive Python: python3 3.8.2 (/usr/bin/python3)
RPC virtualenv....: rpc-venv (/Users/xuehongyang/.emacs.d/elpy/rpc-venv)
 Python...........: python3 3.8.2 (/Users/xuehongyang/.emacs.d/elpy/rpc-venv/bin/python3)
 Jedi.............: 0.17.2
 Rope.............: 0.18.0
 Autopep8.........: 1.5.4 (1.5.5 available)
 Yapf.............: 0.30.0
 Black............: 20.8b1
Syntax checker....: flake8 (/Users/xuehongyang/.emacs.d/elpy/rpc-venv/bin/flake8)

Elpy configuration in my init.el

(elpy-enable)
(setq elpy-syntax-check-command "/Users/xuehongyang/.emacs.d/elpy/rpc-venv/bin/flake8")
(setq elpy-rpc-python-command "python3")
sawan commented 3 years ago

Same issue, M-. wants a TAGS file -- even if the symbol is completely local.

Uthar commented 2 years ago

Same issue in Emacs 28.1