johnsu01 (johnsu01) wrote,
johnsu01
johnsu01

Timestamping for Planner tasks

It's important for me to remember sometimes when I created a task in PlannerMode. Since uncompleted tasks (which in my life is, um, most of the them) get moved forward each day, I can quickly forget how long ago a particular task first landed in my lap. Also, it could be helpful to sort tasks based on their age. Putting a timestamp at the front of the task description when the task is created is one way to handle these issues. Here is the diff for what I changed in planner.el to do this:

<       (let ((plan-page (or plan (planner-task-plan info)))
<             (date-page (or date (planner-task-date info)))
<             (live-buffers
<              (and (equal planner-tasks-file-behavior 'close)
<                   (buffer-list))))
---
>       (let* ((plan-page (or plan (planner-task-plan info)))
>            (date-page (or date (planner-task-date info)))
>            (live-buffers
>             (and (equal planner-tasks-file-behavior 'close)
>                  (buffer-list)))
>            (timestamp (format-time-string "[ %Y-%m-%d ] "
(current-time)))
>            (description (concat timestamp description)))

This will put a date stamp of the form [ 2004-12-17 ] at the beginning of each task. I had the time in there before as well, but it was too much clutter for not enough benefit.

Tags: emacs, lisp, planner
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments