planner tweak: What am I supposed to be doing?
| emacsThis snippet helps me keep track of what I’m supposed to be doing.
I’ve bound it to F9 F9. Calling it with C-u brings me to the planner
page so that I can complete the current task or look at the context.
F9 F9 from that page will restore my window configuration.
(defvar sacha/window-register "w" "Register for jumping back and forth between planner and wherever I am.") (defvar sacha/planner-current-task nil "Current task info.") (defadvice planner-task-in-progress (after sacha activate) "Keep track of the task info." (setq sacha/planner-current-task (planner-current-task-info))) (defun sacha/planner-what-am-i-doing (&optional prefix) "Make it easy to keep track of what I'm supposed to be working on. If PREFIX is non-nil, jump to the current task, else display it in a message. If called from the plan page, jump back to whatever I was looking at." (interactive "P") (if planner-timeclock-current-task (if (string= (planner-task-page sacha/planner-current-task) (planner-page-name)) (jump-to-register sacha/window-register) (if (null prefix) (message planner-timeclock-current-task) (frame-configuration-to-register sacha/window-register) (planner-find-file (planner-task-page sacha/planner-current-task)) (planner-find-task sacha/planner-current-task))) (if prefix (planner-goto-today) (message "No current task. HEY!"))))
You can comment with Disqus or you can e-mail me at sacha@sachachua.com.