Search code examples
pythonemacsropemacspymacsrope

How can I use meta-dot (M-.) in python with emacs?


Is there an equivalent of slime for python?

For example, if I position the cursor on foo() and do M-. (jump to definition) I would like to see the source definition of the function foo

This should work regardless of whether foo is in

1) the local project directory

2) in some ~/.virtualenvs/bar/lib/site-packages

3) in some other python-path

4) virtual env is in use (ie, it should look in my current virtualenv)

Does the pymacs/ropemacs combination do any of this?


Solution

  • To avoid the -e you can use etags and with a find you recursively add the py file:

    find . -type f -name '*.py' | xargs etags