Datenterrorist
"Warum mir aber in neuester Welt Anarchie gar so gut gefällt? Ein jeder lebt nach seinem Sinn, das ist nun also auch mein Gewinn! Ich laß einem jeden sein Bestreben, um auch nach meinem Sinn zu leben." - Johann Wolfgang v. Goethe _

.:: 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