timeclock

Homepage: https://www.gnu.org/software/emacs

Author: John Wiegley

Summary

Mode for keeping track of how much you work

Commentary

This mode is for keeping track of time intervals.  You can use it
for whatever purpose you like, but the typical scenario is to keep
track of how much time you spend working on certain projects.

Use `timeclock-in' when you start on a project, and `timeclock-out'
when you're done.  Once you've collected some data, you can use
`timeclock-workday-remaining' to see how much time is left to be
worked today (where `timeclock-workday' specifies the length of the
working day), and `timeclock-when-to-leave' to calculate when you're free.

You'll probably want to bind the timeclock commands to some handy
keystrokes.  Assuming C-c t is unbound, you might use:

  (define-key (kbd "C-c t i") 'timeclock-in)
  (define-key (kbd "C-c t o") 'timeclock-out)
  (define-key (kbd "C-c t c") 'timeclock-change)
  (define-key (kbd "C-c t r") 'timeclock-reread-log)
  (define-key (kbd "C-c t u") 'timeclock-update-mode-line)
  (define-key (kbd "C-c t w") 'timeclock-when-to-leave-string)

If you want Emacs to display the amount of time "left" to your
workday in the mode-line, you can either set the value of
`timeclock-mode-line-display' to t using M-x customize, or you can
add this code to your init file:

  (require 'timeclock)
  (timeclock-mode-line-display)

To cancel this mode line display at any time, just call
`timeclock-mode-line-display' again.

You may also want Emacs to ask you before exiting, if you are
currently working on a project.  This can be done either by setting
`timeclock-ask-before-exiting' to t using M-x customize (this is
the default), or by adding the following to your init file:

  (add-hook 'kill-emacs-query-functions #'timeclock-query-out)

NOTE: If you change your timelog file without using timeclock's
functions, or if you change the value of any of timeclock's
customizable variables, you should run the command
`timeclock-reread-log'.  This will recompute any discrepancies in
your average working time, and will make sure that the various
display functions return the correct value.

Dependencies

Reverse dependencies