From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Change todo state when scheduled or a deadline is set Date: Fri, 01 Sep 2017 22:01:33 -0500 Message-ID: <87wp5hg5wy.fsf@alphapapa.net> References: <87k21li1rf.fsf@vicarie> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnyhF-00047s-4r for emacs-orgmode@gnu.org; Fri, 01 Sep 2017 23:02:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnyhA-0006VH-A0 for emacs-orgmode@gnu.org; Fri, 01 Sep 2017 23:02:09 -0400 Received: from [195.159.176.226] (port=58545 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnyhA-0006Sh-2w for emacs-orgmode@gnu.org; Fri, 01 Sep 2017 23:02:04 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dnygk-00018m-MT for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 05:01:38 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Narendra Joshi writes: > I would like to change the state of a task to TODO when it is scheduled > or a deadline is set for the task. I couldn't find any hook that is > called after scheduling. How can I do this? Hi Narendra, You're right, looking at org--deadline-or-schedule, there doesn't seem to be a hook for this. So: 1. You could use advice-add to run a function after this is run. 2. You could add a hook to this function and send a patch. :)