"Freiheit ist das Recht, alles zu tun, was anderen nicht schadet." - Pierre Joseph Proudhon _

.:: TODO buffer in Emacs ::.

I wanted to have a buffer when pressing F4 that recursively lists all TODO and FIXME comments in a directory together with the filenames. Here is a simple solution for that:

(defun balle-grep-todos-in-dir (dir &optional not-recursive)
"Grep recursively for TODO comments in the given directory"
(interactive "Ddirectory:")
(let ((recur "-r"))
(if not-recursive
(setq recur "")
(grep (concat "grep -nH -I " recur " -E \"[\\#\\/\\-\\;\\*]\s*TODO|FIXME|XXX:?\" " dir " 2>/dev/null"))
(enlarge-window 7)
(global-set-key [f4] 'balle-grep-todos-in-dir)

posted at 21:54:20 on 06/27/11 by balle - Category: Emacs

.:: Comments ::.

No comments yet

Add Comments