4757 comments
2071 subscribers
4479 on Twitter
Subscribe! Feed reader E-mail

Clocking work time under Planner

Planner uses timeclock.el, which is part of GNU Emacs. To make sure that all
of the relevant libraries are loaded when you start Emacs, add the following
to your ~/.emacs:

   (require 'planner-autoloads)
   (require 'planner-timeclock)

To start the clock on a task, type C-c C-i (planner-task-in-progress).
The task will be marked as “in progress” and the timer will start. To
clock out, mark the task as done (C-c C-x, planner-task-done) or clock
out manually with C-c C-o (timeclock-out).

To see a summary of your time use for any day, call M-x
planner-timeclock-summary. To see a summary of your time use for a
range of days, call M-x planner-timeclock-summary-show-range. The
range function is particularly useful for weekly time reports, which I
find myself now doing.

For even more fun, call M-x
planner-timeclock-summary-show-range-filter, which filters plan pages
and descriptions using the specified regular expression. For example,
to show only the time entries from the last seven days that included
the keyword “@work”, call M-x
planner-timeclock-summary-show-range-filter and specify “@work” as the
filter, “-7″ as the start date, and “.” for the end date. You’ll get a
quick view of all your work-related time-clock entries.

If you use this often, you might want to create a shortcut to show the
timeclock summary for the current file. The following code defines a
function that displays the timeclock summary for the current page (day
or plan), and binds this function to C-c C-s in Planner mode files.

(require 'planner-timeclock-summary)
(require 'planner-timeclock-summary-proj)
(defun sacha/planner-timeclock-summary-show (page)
  "Show the timeclock summary for PAGE (defaults to the current page)."
  (interactive (list (planner-page-name)))
  (if (string-match planner-date-regexp page)
      ;; Day page
      (planner-timeclock-summary-show page)
    ;; Plan page
    (let ((data (planner-timeclock-proj-make-alist page)))
      (switch-to-buffer (get-buffer-create planner-timeclock-summary-buffer))
      (erase-buffer)
      (insert (planner-timeclock-proj-build-report data)))))
(define-key planner-mode-map (kbd "C-c C-s" 'sacha/planner-timeclock-summary-show))

This allows you to see how much time you’ve spent for the current day
or project.

If you like seeing this, you might want the timeclock information
automatically inserted into your Planner pages. To do so, add the following to your ~/.emacs:

(planner-timeclock-summary-proj-insinuate) ; For plan pages
(planner-timeclock-summary-insinuate)  ; For day pages
;; It's easier when both of them overwrite the same report
(setq planner-timeclock-summary-section
      "Timeclock"

      planner-timeclock-summary-proj-section
      "Timeclock"

      ;; Modify this to include your other template sections
      planner-day-page-template
      "* Tasks\n\n\n* Schedule\n\n\n* Timeclock\n\n\n* Notes\n\n\n"

      planner-plan-page-template
      planner-day-page-template)

The sections are updated only if they exist, so you can remove the
sections or add them to your Planner files any time you want.

CAUTION: Because the time information is stored in a separate file,
Planner gets confused if you edit the task details. Make sure you use
the built-in functions for editing the task description
(planner-edit-task-description) or changing the project associated
with a task (planner-replan-task).

On Technorati:

Random Emacs symbol: planner-expand-name – Function: Expand the given NAME to its fullest form.

Short URL: http://sachachua.com/blog/p/4426

Comment, share a thought, ask a question...

Please comment as you, not your organization.





On This Day...

  • 2011: Decision review: Switching from Rackspace Cloud to Linode — I moved my website from Rackspace Cloud to Linode in order to take advantage of Linode’s cheaper rates. A virtual [...]
  • 2010: Notes from Quantified Self Toronto, October 27, 2010 — Bits from the meetup: automated tracking of computer activity, CureTogether.com for aggregated health self-reporting of conditions and treatments, and the [...]
  • 2009: Big dreams and small dreams can coexist — On the way home from work yesterday, I realized that big dreams and small dreams can co-exist. I’ve struggled with that [...]
  • 2007: Weekly review 2007.10.21 – 2007.10.28 — Summary – In terms of my goals from last week: Organize information Haven’t rearranged our group Activity yet. Plan external blog Brainstormed names. Now [...]
  • 2007: Org: Changing the task states — I find it useful to keep track of which tasks I’ve started. Adding the following line to the start of my [...]
  • 2007: Clocking work time under Org — Whether you submit detailed timesheets to clients or not, it’s a good idea to estimate and keep track of the time [...]
  • 2005: Testing… testing… is the mic on? — If this works, then I’ve successfully gotten planner-rss to work. Like before it is an idiosyncratic mess of duct tape and [...]
  • 2004: CRAZED By Patricia Chanco Evangelista — The Philippine STAR 10/22/2004 Interesting article about good causes. (Or interesting exposition of how we’re so used to being able to dig [...]
  • 2004: Congrats, Kendra! — The School of Science and Engineering is proud to annouce that Charlotte Kendra G. Castillo (BS Physics and Class Valedictorian of Batch [...]
  • 2004: SAY NO TO SOFTWARE PIRACY — http://www.mb.com.ph/SCTY2004102421147.html SAY NO TO SOFTWARE PIRACY By Ethel Timbol Consumers Post Check it out. Nice article. Kudos to Alex Timbol for helping his mom. [...]
  • 2003: Notes on conference — Again, let me tell you stories from this one. If you went to the National Conference on IT Education (NCITE 2003), [...]
  • 2003: Notes on rest and recreation — Instead of breathlessly enumerating all the different things we saw today, let me tell you a story from our rest and [...]
  • 2003: Things to bring for resta nd recreation — Personal effects such as swimsuits, towels, hats, toiletries, medicine, golf clubs if you wish to play golf and tennis/squash rackets/balls for tennis/squash [...]