planner-schedule.el allows you to project task completion time. Tasks should be of the form:
#A0 _ 2h Do something #B0 _ 1h30m Do something #B0 _ 2d Do something #B0 _ 2w Do something #B0 _ 10s Do something s: seconds, m: minutes, h: hours, d: days, w: weeks
schedule.el is included with Planner in the contrib directory, but you can alternatively get it from http://www.newartisans.com/johnw/Emacs/schedule.el if desired.
schedule.el provides a single Lisp function,
schedule-completion-time
. It takes an Emacs time object and a
quantity of seconds. It returns an Emacs time object that represents
when the given number of seconds will be completed, assuming that work
can only be done during work hours.
The available work hours are affected by several factors:
timeclock-workday-remaining
)
(see Time Intervals)
schedule-workday
)
schedule-week
)
Taking all of the “block out” periods into account,
schedule-completion-time
will compute when the given number of
seconds will be done, based on your current definitions of time
available.
As an example, here's a function which, given a list of durations in seconds, will return a list of completion times starting from the current moment:
(defun compute-completion-times (&rest durations) ``Compute completion times for a list of DURATIONS (in seconds).'' (let ((now (current-time))) (mapcar (function (lambda (dura) (setq now (schedule-completion-time now dura)))) durations)))
To call this function, do:
(compute-completion-times 3600 7200 3600)
planner-schedule.el defines the following keybindings:
C-c RET is bound to planner-schedule-show-end-project. C-c C-m is also bound to planner-schedule-show-end-project.
In XEmacs, planner-schedule-show-end-project is bound to C-c C-T c-e and C-c C-S-t C-e.
planner-schedule.el defines the following interactive functions:
schedule.el does not define any interactive functions, or keybindings.