I’m happy to announce that I just released a new version of Elpy, the Emacs Lisp Python Environment. You can find a list of news since the last release below.
Elpy is an Emacs package to bring powerful Python editing to Emacs. It combines a number of other packages, both written in Emacs Lisp as well as Python.
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
M-x package-install RET elpy RET.
Finally, run the following (and add them to your
Python Backend Rewrite
- Elpy does not use Pymacs, Ropemacs and Ropemode anymore, but instead provides its own Python interface with the elpy package on PyPI.
- This not only should improve performance, but also enables using
Jedi as an alternative backend for completion. Use
M-x elpy-set-backendto change between rope and jedi. For now, this does disable all refactoring support, though.
- Elpy now has built-in project support. The interface is rather
simple: You can set
elpy-project-rootto the correct value in
.dir-locals.el, or just rely on the automatic detection. If you change your mind, you can always just
- New dependency: Find File in Project (ffip), bound to
C-c C-fby default. This will allow you to find files anywhere in your project using a search-as-you-type interface like ido.
- New dependency: nose, bound to
C-c C-tby default. This will run the nosetests binary in the root of your current library directory. You can restrict the tests being run to the current test or the current module by adding prefix arguments.
- New function: Recursive grep for symbol, bound to
C-c C-sby default. This will search for the symbol at point in the whole project.
- idomenu, bound to
C-c C-jby default. This replaces the standard imenu interface with an ido-based search-as-you-type interface for definitions in the current buffer.
- virtualenv.el, replacing pyvirtualenv.el). Use
M-x virtualenv-workonto enable a virtualenv.
- iedit.el, bound to
M-,by default. This highlights all occurrences of the symbol at point or the active region in the current buffer or narrowing. When you edit any of them, all others will be edited the same. This allows some basic and very quick refactoring.
- New variable
elpy-default-minor-modeswhich is run by
elpy-modeon startup. If you don’t want to use some modes, remove them from here.
Key Bindings and Functions
- The key bindings have been reworked and cleaned up. Sorry, this might cause confusion.
- Yasnippet is now on its own keybinding,
C-c C-i, instead of sharing the auto-complete interface. This was done because some snippets conflicted with legitimate, unsnippy completions.
- New function: Occur Definitions, bound to
C-c C-oby default. This will run the standard occur command to show definitions (classes and functions) in your current buffer, giving you a very quick outline and the ability to jump to different definitions quickly.
- New function: Show Defun, bound to
C-c C-qby default. This will show the current method and possibly class in the mode line, which is helpful in long functions.
- New functions: Forward/backward definition, bound to
M-pas well as
<M-up>by default. These will jump to the next or previous definition (class or function), helping with quick navigation through a file.
- The documentation function (
C-c C-d) now uses pydoc when a prefix arg is given.
- The web search function (
C-c C-w) now searches for the current symbol by default. The tab-completing web documentation interface was removed and is scheduled to be replaced with a new pydoc interface in future versions.
python-check.shis now shipped with elpy. If you load elpy.el before you load python.el, it should be the default