provide virtualenv support

Registered by Andreas Roehler

Blueprint information

Needs approval
Andreas Roehler
Series goal:
Milestone target:
milestone icon 6.1.2
Started by
Andreas Roehler
Completed by
Andreas Roehler

Related branches



Gabriele Lanaro's

Introduce features delivered by


The abl-mode is a minor mode for python programmers who develop using virtual environments, version control branches and unit tests.
What does it do?

Abl-mode is ideal for developers who switch development branches frequently, and create python virtual environments for these individual branches. When you run a test with C-c t or start a server with C-c r, abl-mode checks the availability of a virtual environment for the branch you're on. The name of the virtual environment is determined according to the name of the project and the VCS branch. If there is no such virtual environment, the user is prompted either for the name of a replacement virtual environment, or y for creating a new virtual environment. Once you've run a test, and made some changes depending on the results, you can rerun the same test with C-c u.

To install abl-mode, put abl.el on your elisp path, and include the following in your emacs configuration file:

(require 'abl)

If you want to activate abl-mode automatically, add the following to your configuration:

(add-hook 'find-file-hooks 'abl-mode-hook)

You can replace find-file-hooks with python-mode-hook if you want to activate abl-mode only for python files.
Commands and their default key bindings
M-x abl-mode Toggle abl-mode
C-c w Which branch am I on? (If you're in a git repository, the outcome of the 'git branch' command; if you're in a subversion repository, the name of the directory)
C-c t Run test at point (function if cursor is inside a function, class if cursor is inside a class but not in a function, file if cursor is at the first line of a file)
C-c u Rerun last test entity (whatever was run the last time with C-c t)
C-c r Run the web server for the branch you're on (or whatever else you have customized it to be)
C-c s Run the python shell for the virtualenv of this branch
C-c o Open the python entity at point. The python entity must be in the format
C-c a Reload all buffers that have no unsaved changes (useful if you switch branches on git; notifies you in case there were buffers with unsaved changes)


Work Items

This blueprint contains Public information 
Everyone can see this information.