[Top][All Lists]

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

[Orgmode] Re: Remove scheduled date when switch TODO states

From: Matt Lundin
Subject: [Orgmode] Re: Remove scheduled date when switch TODO states
Date: Mon, 22 Feb 2010 13:10:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Nathaniel Flath <address@hidden> writes:

> I have a todo state, PENDING, that I organize tasks that I cannot
> perform immediately.  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---


reply via email to

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