From mboxrd@z Thu Jan 1 00:00:00 1970 From: Deric Bytes Subject: Changing todo status to waiting before clocked out. Date: Sat, 11 Apr 2009 13:28:06 +0100 Message-ID: <59b700510904110528q420228a9y8b1849b460c65caf@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LscJl-0007AJ-N6 for emacs-orgmode@gnu.org; Sat, 11 Apr 2009 08:28:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LscJf-00078A-At for emacs-orgmode@gnu.org; Sat, 11 Apr 2009 08:28:15 -0400 Received: from [199.232.76.173] (port=56193 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LscJd-00077q-5w for emacs-orgmode@gnu.org; Sat, 11 Apr 2009 08:28:09 -0400 Received: from fk-out-0910.google.com ([209.85.128.186]:64540) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LscJc-0003u8-MD for emacs-orgmode@gnu.org; Sat, 11 Apr 2009 08:28:08 -0400 Received: by fk-out-0910.google.com with SMTP id z23so621005fkz.10 for ; Sat, 11 Apr 2009 05:28:07 -0700 (PDT) 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: emacs-orgmode@gnu.org How can I change the todo status before an item is clocked out. I was hoping for something like the following (add-hook 'org-before-todo-state-change-hook 'dericbytes/org-clock-out-change-status-to-waiting) (defun dericbytes/org-clock-out-change-status-to-waiting () (save-excursion (goto-char org-clock-marker) (org-todo "WAITING")))