TDD status on the Emacs mode line
Emacs Lisp Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

TDD status mode-line widget

Build Status MELPA

This little package implements a mode-line widget to track one's current test-driven development state (FAIL, PASS, or REFACTOR). Fully customisable faces and states and all that. The idea is based on a similar solution for Vim.



Once the package is downloaded, either via a git checkout or simply saving the tdd-status-mode-line.el file somewhere on your load path, simply require it and enable one of the two minor modes it provides.

The package is also available from Marmalade and MELPA:

(require 'package)
;; Use one or both of the following two lines
(add-to-list 'package-archives '("marmalade" . ""))
(add-to-list 'package-archives '("melpa" . ""))
(package-install 'tdd-status-mode-line)

(require 'tdd-status-mode-line)


The package defines two minor modes, only one of which should be enabled at a time, and switching between them is not supported. Both of them provide the same key bindings:

  • C-x t n advances the state (from none to FAIL, then to PASS and onto REFACTOR, and finally back to FAIL).
  • C-x t p steps the state back (from PASS to FAIL, etc).
  • C-x t c clears the state and hides the widget.

The two minor modes are tdd-status-minor-mode and tdd-status-global-mode, where the first enables the mode for the current buffer only and will track the TDD state on a per-buffer basis from that point on; the second enables the mode globally, with global tracking.

To use the buffer-local mode of operation, place something like this in your init file:

(require 'tdd-status-mode-line)
(add-hook 'prog-mode-hook 'tdd-status-minor-mode)

To enable it globally, use something like the following:

(require 'tdd-status-mode-line)