From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: how to unschedule a task in agenda view? Date: Thu, 14 Jan 2010 13:00:47 +0000 Message-ID: <87ljg0264g.wl%ucecesf@ucl.ac.uk> References: <87zl4h0vx2.wl%ucecesf@ucl.ac.uk> Reply-To: Eric S Fraga Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVQ4P-0002kM-08 for emacs-orgmode@gnu.org; Thu, 14 Jan 2010 08:49:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVQ4K-0002i8-2a for emacs-orgmode@gnu.org; Thu, 14 Jan 2010 08:49:04 -0500 Received: from [199.232.76.173] (port=59845 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVQ4J-0002hy-GW for emacs-orgmode@gnu.org; Thu, 14 Jan 2010 08:48:59 -0500 Received: from mx20.gnu.org ([199.232.41.8]:15962) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVQ4I-0001KZ-1m for emacs-orgmode@gnu.org; Thu, 14 Jan 2010 08:48:58 -0500 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVPLp-0001PF-4v for emacs-orgmode@gnu.org; Thu, 14 Jan 2010 08:03:01 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Manish Cc: org-mode mailing list 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