emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] how to unschedule a task in agenda view?


From: Eric S Fraga
Subject: Re: [Orgmode] how to unschedule a task in agenda view?
Date: Thu, 14 Jan 2010 13:00:47 +0000
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Thu, 14 Jan 2010 18:07:34 +0530,
Manish wrote:
> 
> There is a hook "org-after-todo-state-change-hook" that is called
> after the state of a TODO item is changed.  So may be org-schedule can
> be called to remove the SCHEDULED time on state change to WAITING?
> 
> http://orgmode.org/worg/org-configs/org-hooks.php#sec-1.13

This works like a charm:

--8<---------------cut here---------------start------------->8---
(add-hook 'org-after-todo-state-change-hook
          '(lambda ()
             ;; remove the scheduled date/time if present as the activity is no 
longer mine
             ;; based on a suggestion by Manish on the org-mode mailing list
             (if (string= state "WAITING") (org-schedule t))))
--8<---------------cut here---------------end--------------->8---

Thanks again,
eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]