I use elpy for python development, and the command M-.
, elpy-goto-defintion to follow a function to its definition in a python project is a life-saver.
There isn't a TAGS table anywhere in my project, has never been, and this command just works, no TAGS table being created or used.
But sometimes, I do not know why, I start getting a message when I type M-.
that emacs needs to find a tags table. And the only thing I can do to stop it from asking that is to restart emacs. I assume it uses a different command to fulfill M-.
rather than the elpy default of elpy-goto-defintion
.
How can I say, "no, go back to however you were configured a second ago, before you thought you needed a tags table?" What setting is getting changed where sometimes this becomes a requirement?
Is it elpy, projectile, or other?
I'm seeking answers that help me keep the default command working without defining a TAGS table.
Reloading my ~/.emacs.d/init.el
file does not work.
Update
Here is my mode information, with C-h m
Enabled minor modes: Async-Bytecomp-Package Auto-Composition
Auto-Compression Auto-Encryption Auto-Revert Blink-Cursor
Column-Number Company Eldoc Electric-Indent Elpy File-Name-Shadow
Flymake Font-Lock Global-Eldoc Global-Font-Lock Global-Git-Commit
Global-Linum Helm Highlight-Indentation Importmagic Line-Number Linum
Magit-Auto-Revert Menu-Bar Mouse-Wheel Override-Global Projectile
Pyvenv Shell-Dirtrack Show-Paren Tool-Bar Tooltip Transient-Mark Yas
(Information about these minor modes follows the major mode info.)
Python mode defined in ‘python.el’:
Major mode for editing Python files.
And after a fresh restart:
Enabled minor modes: Async-Bytecomp-Package Auto-Composition
Auto-Compression Auto-Encryption Blink-Cursor Column-Number Company
Eldoc Electric-Indent Elpy File-Name-Shadow Flymake Font-Lock
Global-Eldoc Global-Font-Lock Global-Git-Commit Global-Linum Helm
Highlight-Indentation Importmagic Line-Number Linum Magit-Auto-Revert
Menu-Bar Mouse-Wheel Override-Global Projectile Pyvenv Shell-Dirtrack
Show-Paren Tool-Bar Tooltip Transient-Mark Yas
(Information about these minor modes follows the major mode info.)
Python mode defined in ‘python.el’:
Major mode for editing Python files.
Only difference I'm seeing is Auto-Revert
?
Update
My goal is to disable the request to tags table with some other function that can goto-definition correctly.
References to other links that have /not worked out/ for this:
M-.
has been rebound, and if so what it’s been rebound to. UseC-h k
to find out.python-mode
, since the binding was found in the global keymap rather than the mode’s keymap. Check what mode(s) the buffer is in usingC-h m
.M-x elpy-goto-definition
once, then it works okay.