sacha chua :: living an awesome life

2086 blog subscribers
2750 on Twitter
Subscribe!
E-mail Feed reader

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.

So-soHmmGoodGreatAwesome! (No Ratings Yet)
Loading ... Loading ...
Save to - del.icio.us - Digg it - reddit - StumbleUpon -

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

Discussion Area - Leave a Comment

Please comment as you, not your organization.





On This Day...

  • 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: [...]
  • 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. [...]
  • 2004: I wait for your reply — A: ¤ªÊÖ»ö¡¢¤ªÂÔ¤Á¤·¤Æ¤ª¤ê¤Þ¤¹¡£ I wait for your reply. B: ÊÖ»ö E-Mail%20to%20Fumiko%20Kikuta
  • 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 [...]