Skip to content
Keeps track of time you spend in each buffer in emacs and summarizes your time spent.
Emacs Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


buffer-timer is a utility to keep track of the time spent in a series of emacs buffers. You can then collectively group buffers into tasks and thus keep track of your overall time spent per project, for example.


Define your categories in a hierarchical manner:

(require 'buffer-timer)

; Example list of titles and regexps to group by.  This
(setq buffer-timer-regexp-master-list
    ("idle" . 
     (("generic" .			  "^\\*idle\\*")
      ("generic2" .			  "^\\*idle-2\\*")
      ("minibuf" .                        "^ \\*Minibuf-.*")))
    ("personal" .
     (("reading" .                        "lib/ebooks/")
      ("photography" .                    "images/capturedonearth")))
    ("work" .
      (("rocket engine project" .
        (("docs" .                        "src/rocket.*org")
         ("code" .                        "src/rocket.*\\(cpp\\|h\\)$")
         ("generic" .                     "src/rocket")))
       ("world peace" .
        (("project planning" .            "src/worldpeas/TODO")
         ("implementation" .              "src/worldpeas")))))

And then start editing like you normally would! At the end of the day, type C-c t m to get a summary of your time spent matched to the hierarchy.


Originally written for XEmacs, with a pretty “top (gutter) bar” it has since migrated to Emacs where it still is missing some of the original functionality. The button code and “top bar” functionality needs to be rewritten entirely.

You can’t perform that action at this time.