From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: help advicing org-todo Date: Thu, 03 Jan 2013 12:25:00 -0500 Message-ID: <10532.1357233900@alphaville> References: <87zk0q2owj.fsf@bzg.ath.cx> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoXW-00028z-94 for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 12:25:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqoXQ-0006pf-Vc for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 12:25:10 -0500 Received: from g1t0028.austin.hp.com ([15.216.28.35]:31425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoXQ-0006lE-OA for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 12:25:04 -0500 In-Reply-To: Message from Luca Ferrari of "Thu, 03 Jan 2013 18:16:22 +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: Luca Ferrari Cc: Bastien , emacs-orgmode@gnu.org Luca Ferrari wrote: > Thanks, > a very good advice. Now, forgive my lisp ignorance, but I've defined > the following function to do what I want: > > (defun org-todo-automatic-clock () > "Starts/Stops the clock when a task is marked as implementing or completed" > (if (string= state org-todo-fluca1978-running) > (org-clock-in) > (if (or (string= state last-state) (string= state > org-todo-fluca1978-suspended)) > (org-clock-out) > ) > ) > ) ;end of defun > > > the problem is how to tell the org-todo-keyword to use variables > instead of strings, since the following is not working: > > (setq org-todo-fluca1978-running "IMPLEMENTING(i!)" ) > (setq org-todo-fluca1978-suspended "SUSPENDED(s!)" ) > > (setq org-todo-keywords > '( > (sequence "FEATURE(f!)" "BUG(b!)" > 'org-todo-fluca1978-running 'org-todo-fluca1978-suspended "|" > "COMPLETED(c!)") > )) > > What am I missing here? > OTTOMH: Should state be org-state instead? Nick