6085 comments
2357 subscribers
6224 on Twitter
Subscribe! Feed reader E-mail

Planner Tip #2: Streamline undated tasks

One of the coolest things about Planner is the way you can tweak it to
fit the way you think. Customizing planner-create-task isn’t about
shaving seconds off your task-creation time. It’s about making it
easier to get tasks out of your head and into Planner.

Variables like planner-expand-name-default and planner-use-day-pages
make it easy to change Planner behavior to fit common ways of doing
things. If you want to make greater changes, you can add advice to
functions. See “Advising Functions” in the Elisp info manual for more
information. Function advice is called only after arguments have been
read. If you want to change the way arguments are asked for, define a
new function and make an alias to it, or just redefine the old one.

Do you prefer working with mostly-undated tasks? Defaulting to undated
tasks allow you to postpone thinking about when to do something. It
keeps your day page task lists meaningful and manageable, too. This
also makes Planner a better fit for the Getting Things Done method
(GTD), which encourages a distinction between getting tasks into your
trusted system and deciding when to do them.

Creating undated tasks

Let’s say that you want to create undated tasks while still
using day pages for other parts of Planner. Here’s one way to do that.

(defadvice planner-read-task (around sacha activate)
  (let ((planner-use-day-pages nil))
    ad-do-it))

To disable that piece of advice, use M-x ad-deactivate RET planner-read-task.

What if you want to create dated tasks if
planner-create-task-from-buffer is called with the universal prefix
(C-u)? Disable the previous piece of advice or remove it from your
~/.emacs and use this instead:

(defun planner-read-task ()
  "Return a list of information for a task."
  (list
   (read-string "Describe task: ")
   ;; This part changes
   (when current-prefix-arg
     (if (condition-case nil (calendar-cursor-to-date) (error nil))
         (planner-date-to-filename (calendar-cursor-to-date))
       (let ((planner-expand-name-favor-future-p
              (or planner-expand-name-favor-future-p
                  planner-task-dates-favor-future-p)))
         (planner-read-date))))
   ;; This part still stays the same
   (when planner-use-plan-pages
     (let ((planner-default-page
	    (if (and (planner-derived-mode-p 'planner-mode)
		     (planner-page-name)
		     (not (string-match planner-date-regexp
					(planner-page-name))))
		(planner-page-name)
	      planner-default-page)))
       (planner-read-non-date-page
	(planner-file-alist))))
   planner-default-task-status))

What if you always want to prompt for the date, but want it to default to undated when you hit RET?
Use the following to your ~/.emacs instead:

(setq planner-expand-name-default nil)
Copying undated tasks somewhere

If you’re working with undated tasks, then you probably want to make
sure they’re copied onto a task page somewhere. You can use
planner-multi to automatically do so when you create a task.

(require 'planner-multi)
(setq planner-multi-copy-tasks-to-page "TaskPool")

You can specify multiple pages for planner-multi-copy-tasks-to-page. For example:

(setq planner-multi-copy-tasks-to-page "TaskPool [[TaskPoolByProject][p]] [[TaskPoolByContext][c]]")

If you want to be explicitly prompted for pages, but default to
Task Pool if not specified:

(defun planner-read-task ()
  "Return a list of information for a task."
  (list
   (read-string "Describe task: ")
   (when (and planner-use-day-pages current-prefix-arg)
     (if (condition-case nil (calendar-cursor-to-date) (error nil))
         (planner-date-to-filename (calendar-cursor-to-date))
       (let ((planner-expand-name-favor-future-p
              (or planner-expand-name-favor-future-p
                  planner-task-dates-favor-future-p)))
         (planner-read-date))))
   (when planner-use-plan-pages
     (let ((planner-default-page "TaskPool"))
       (planner-read-non-date-page
        (planner-file-alist))))
  planner-default-task-status))

Have fun with undated tasks!

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

On This Day...

  • 2012: Sketchnotes: SOHO SME Expo 2012 — These sketchnotes are from the SOHO SME Expo 2012. Unfortunately, I missed parts of the other sessions! Feel free to share [...]
  • 2012: Sketchnotes: Startup Communities and Entrepreneurial Ecosystems — This is from Brad Feld‘s talk last night on Startup Communities and Entrepreneurial Ecosystems at the Toronto Reference Library. Feel free [...]
  • 2011: Quantified Awesome: Data from waking up 3 hours earlier than normal — I’ve been taking advantage of jetlag to wake up earlier than usual. I go to bed when I’m tired and [...]
  • 2010: Weekly review: Week ending October 31, 2010 — From last week’s plans Work [X] Drupal: Work on Drupal project [X] Idea Labs: Help compile Idea [...]
  • 2009: Grocery round-up: Toronto — We shop according to what’s on sale at the supermarket so that we can stock up on staples and fill [...]
  • 2009: Flowcharts and drawing — J-’s social studies lesson included two flowcharts. W- asked if the flowcharts had diamonds indicating conditionals. Apparently not, so we [...]
  • 2007: Halloween — I enjoyed this year’s Halloween more than the first two I’d spent in Canada. I had spent both previous Halloweens in [...]
  • 2006: The programming competitions continue… — Didith Rodrigo’s blog post about Ateneo’s performance in the ACM Intercollegiate Programming Competition reminded me that the first-years I taught [...]
  • 2006: Remembering to breathe — One of the things about always being on, always working on stuff, is that it’s sometimes hard to remember to just [...]
  • 2004: Debugging people — Of course I would. If I knew the right way to say it. ::sighs:: I’m a computer geek. <grin> I’m used [...]
  • 2004: Open Source Developer Contest – Sponsored by IBM — Hi, I am attempting to let some of the larger US-based Linux User Groups know about a contest we are sponsoring. [...]
  • 2004: Great valedictory speech — In Filipino, though. Find a friend who can translate it for you. (Semi-liberal translation follows after. Please don’t laugh.) Probably De La [...]
  • 2004: Convenience — A 5-meter LAN cable is just long enough for me to bring my computer into the bathroom. Mwahaha!
  • 2004: Stuff to check out — Ken Loach. “He’s got amazing movies.” “You’re showing off.” Land and Freedom. Ladybird, ladybird. (Not sure.) And it’s either one ladybird or two [...]
  • 2004: Odd thing — Turned on TV out of impulse. Checked out movies. Japanese subtitles. What’s this? A sidecar? Jeeps? Passersby standing around and looking at the camera? Turned [...]
  • 2003: balance — ftp://ftp.azc.uam.mx/mirrors/gnu/emacs-lisp/incoming/balance.el I should look into this and see if I can get double-entry bookkeeping set up nicely. I’ll also want my split [...]
  • 2003: The Lord of the Editors — or One Emacs to Rule Them All by Raffael Cavallaro Knuth’s Tex for the Math-kings of sigma, and pi,     Unix vim for the [...]
  • 2003: Reflection on 2003.10.30 — Hacked on planner.el and planner-id.el. Practically rewrote planner-id.el, in fact, as I wanted to use an alist of data instead. Have gotten [...]

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging