emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] help advicing org-todo


From: Nick Dokos
Subject: Re: [O] help advicing org-todo
Date: Thu, 03 Jan 2013 12:25:00 -0500

Luca Ferrari <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]