buildout.el, Emacs bliss for buildouts

Emacs can be a nice OS for doing Python development with. You can use the built-in eshell to execute your code, start your server and run your tests. It is even nicer to use things like gud, compile mode and tags. If you are working on multiple projects (like I am) over the course of a day it can be a bit to much to M-x pdb <enter full path to bin/instance> every time.

This is where buildout.el comes in. It has a few interactive functions (which you should bind to a shortcut, like the F1-12 keys) to execute these things. It knows where you are by checking the location of the current buffer and then crawls up until it finds something which looks like a buildout directory.

These are the features it currently provides:

  • Buildout invocation (with bootstrap if necessary)
  • Creation of a tags file (using etags)
  • Running the tests in compile mode (colors + jump to the line which triggered the failure)
  • Start your app server (bin/instance or bin/django) in a gud session

If you have any suggestions for improvements please let me know so we can make it even better. The only thing left to do is to download buildout.el, just add something like (load-library “buildout”)
to your .emacs and add keybindings. These are mine:

;; Key bindings
(global-set-key ‘[f5] ‘run-application-based-on-buffer)
(global-set-key ‘[f9] ‘run-buildout-based-on-buffer)
(global-set-key ‘[f8] ‘run-etags-based-on-buffer)
(global-set-key ‘[f12] ‘run-tests-based-on-buffer)

Advertisements

No comments yet

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: