From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: Manish <mailtomanish.sharma@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: how to unschedule a task in agenda view?
Date: Thu, 14 Jan 2010 13:00:47 +0000 [thread overview]
Message-ID: <87ljg0264g.wl%ucecesf@ucl.ac.uk> (raw)
In-Reply-To: <e7cdbe31001140437q27e7fb90vfd8e929b8c580ec0@mail.gmail.com>
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
prev parent reply other threads:[~2010-01-14 13:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 11:26 how to unschedule a task in agenda view? Eric S Fraga
2010-01-14 11:41 ` Benjamin Andresen
2010-01-14 11:41 ` Paul Mead
2010-01-14 12:37 ` Eric S Fraga
2010-01-14 12:44 ` Manish
2010-01-14 12:59 ` Eric S Fraga
2010-01-14 12:47 ` Benjamin Andresen
2010-01-14 12:56 ` Eric S Fraga
2010-01-14 18:42 ` Carsten Dominik
2010-01-14 19:49 ` Eric S Fraga
2010-01-14 12:37 ` Manish
2010-01-14 12:43 ` Eric S Fraga
2010-01-14 13:00 ` Eric S Fraga [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ljg0264g.wl%ucecesf@ucl.ac.uk \
--to=ucecesf@ucl.ac.uk \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=mailtomanish.sharma@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.