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

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 Org file adds STARTED to my to-do
status keywords.

#+SEQ_TODO: TODO(t) STARTED(s) WAITING(w) | DONE(d)

Here’s some code to make it easier to clock in and out of tasks:

(defun sacha/org-clock-in-if-starting ()
  "Clock in when the task is marked STARTED."
  (when (and (string= state "STARTED")
             (not (string= last-state state)))
    (org-clock-in)))
(add-hook 'org-after-todo-state-change-hook
	  'sacha/org-clock-in-if-starting)
(defadvice org-clock-in (after sacha activate)
  "Set this task's status to 'STARTED'."
  (org-todo "STARTED"))

On Technorati: ,

Random Emacs symbol: isearch-update-ring – Function: Add STRING to the beginning of the search ring.

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

One Response to “Org: Changing the task states”

  1. Thanks for this code. I found it really helpful…. I wrote some code to start the clock from a remember template insertion when the TODO state is STARTED. I posted it on the org mailing list.

    http://thread.gmane.org/gmane.emacs.orgmode/12862/focus=12867

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: 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 [...]
  • 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 [...]