From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Ferrari Subject: Re: help advicing org-todo Date: Thu, 3 Jan 2013 18:16:22 +0100 Message-ID: References: <87zk0q2owj.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoP4-0005hc-8N for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 12:16:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqoP1-0004Hc-93 for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 12:16:26 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:50528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoP1-0004HR-2G for emacs-orgmode@gnu.org; Thu, 03 Jan 2013 12:16:23 -0500 Received: by mail-wi0-f172.google.com with SMTP id o1so11023128wic.17 for ; Thu, 03 Jan 2013 09:16:22 -0800 (PST) In-Reply-To: <87zk0q2owj.fsf@bzg.ath.cx> 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 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? Thanks, Luca