From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Remove scheduled date when switch TODO states Date: Mon, 22 Feb 2010 13:10:06 -0500 Message-ID: <87sk8tcfb5.fsf@fastmail.fm> References: <5e3a506e1002201213i1e14bad3q844adeb6fa04cc4c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Njcj8-0003M9-30 for emacs-orgmode@gnu.org; Mon, 22 Feb 2010 13:09:50 -0500 Received: from [140.186.70.92] (port=39910 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Njcj6-0003M1-CC for emacs-orgmode@gnu.org; Mon, 22 Feb 2010 13:09:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Njcj5-0005yX-Bh for emacs-orgmode@gnu.org; Mon, 22 Feb 2010 13:09:48 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:42079) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Njcj5-0005yT-5S for emacs-orgmode@gnu.org; Mon, 22 Feb 2010 13:09:47 -0500 In-Reply-To: <5e3a506e1002201213i1e14bad3q844adeb6fa04cc4c@mail.gmail.com> (Nathaniel Flath's message of "Sat, 20 Feb 2010 12:13:44 -0800") 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: Nathaniel Flath Cc: emacs-orgmode@gnu.org Nathaniel Flath writes: > I have a todo state, PENDING, that I organize tasks that I cannot > perform immediately.=C2=A0 Is there a way to configure org-todoconfigure = so > that when a task is switched to PENDING, if it has a scheduled date > that date is removed? You could use the hook org-after-todo-state-change-hook. E.g. --8<---------------cut here---------------start------------->8--- (defun my-org-pending-remove-deadline () (when (equal (org-entry-get nil "TODO") "PENDING") (org-remove-timestamp-with-keyword org-deadline-string))) (add-hook 'org-after-todo-state-change-hook 'my-org-pending-remove-deadline) --8<---------------cut here---------------end--------------->8--- Best, Matt