Skip to content

Instantly share code, notes, and snippets.

@outworlder
Created October 27, 2008 18:11
Show Gist options
  • Save outworlder/20152 to your computer and use it in GitHub Desktop.
Save outworlder/20152 to your computer and use it in GitHub Desktop.
Function to count the number of TODO's in a file
(defun count-todos-in-buffer ()
(interactive)
(save-excursion
(goto-char (point-min))
(message "Number of TODO's in the current buffer: %d" (count-matches "TODO"))))
(set-key "<C-f7>" 'count-todos-in-buffer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment