I recently installed python-mode (via package-list-packages). Since then, whenever I put my cursor by a function I've defined, it jumps to it, and if I put my cursor by a builtin function or operator (or some installed third party thing, like a module name), it opens python-help.

I would like to stop this happening. Any ideas on how to stop this, or even really what might be doing this if it's not python-mode would be very helpful.

  • Do you see the same thing with the builtin python-mode (which should generally give you pretty much the same featureset)? – Stefan Mar 21 '17 at 12:09
  • @Stefan I do not – Marcin Mar 21 '17 at 17:38

FWIW, Emacs comes with a python-mode by default, that comes from a file called python.el. There is also a package available on MELPA called python-mode, which will override the built-in python-mode.

When I installed the MELPA python-mode and tried to use it, various sorts of oddness happened -- it kind of looked like it was trying to execute the code as I was typing it, maybe? It was similar to what you describe.

I would try deleting the python-mode package you installed, restart Emacs, and open up a Python script and see if Emacs doesn't just do the right thing all by itself, without needing to install anything.


What worked for me was:

(add-hook 'python-mode-hook
          (lambda ()
            (kill-local-variable 'eldoc-documentation-function)))
  • 2
    Can you elaborate on your answer? – user12563 Aug 15 '19 at 19:29

Does this happen also when you start Emacs using emacs -Q (no init file), and you just load the python-mode package? If not, bisect your init file to find the problem. If yes, check the doc or code of that package for a way out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.