From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [bug] changing TODO status with org-after-todo-state-change-hook defined fails Date: Fri, 1 Mar 2013 20:19:46 +0000 Message-ID: <87sj4e3mal.fsf@ucl.ac.uk> References: <87r4jz2n8h.fsf@pinto.chemeng.ucl.ac.uk> <87wqtraxos.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBWR0-0003fl-Pk for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 15:20:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBWQz-0002Cf-Ag for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 15:20:02 -0500 Received: from ch1ehsobe004.messaging.microsoft.com ([216.32.181.184]:6577 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBWQz-00024I-5c for emacs-orgmode@gnu.org; Fri, 01 Mar 2013 15:20:01 -0500 In-Reply-To: <87wqtraxos.fsf@bzg.ath.cx> (Bastien's message of "Fri, 1 Mar 2013 17:31:47 +0100") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org Bastien writes: > Hi Eric, > > Eric S Fraga writes: > >> #+begin_src emacs-lisp >> (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= org-state "WAIT") (org-schedule t)))) >> #+end_src > > You need to use (org-schedule '(4)) here, this is part of a change > in master that allows to use C-u C-u C-c C-s to add a delay (and > same for C-u C-u C-c C-d which adds a warning delay.) > > HTH! It does indeed! I did read the description of org-schedule to remind myself of why I had what I did there but I kind of skimmed over the "universal argument" bit... However, I would suggest that a more graceful exit might be good? I still do not understand why the log message wasn't prompted for. Anyway, thanks: my setup is working again as it should! -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1313-g7d4812