emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Luca Ferrari <fluca1978@infinito.it>
Cc: Bastien <bzg@altern.org>, emacs-orgmode@gnu.org
Subject: Re: help advicing org-todo
Date: Thu, 03 Jan 2013 12:25:00 -0500	[thread overview]
Message-ID: <10532.1357233900@alphaville> (raw)
In-Reply-To: Message from Luca Ferrari <fluca1978@infinito.it> of "Thu, 03 Jan 2013 18:16:22 +0100." <CAKoxK+6aB+penxFZsnLFkJd=MRdPdHnuki53ouv9=OQb+wUpJA@mail.gmail.com>

Luca Ferrari <fluca1978@infinito.it> 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	other threads:[~2013-01-03 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 16:02 help advicing org-todo Luca Ferrari
2013-01-03 16:48 ` Bastien
2013-01-03 17:16   ` Luca Ferrari
2013-01-03 17:25     ` Nick Dokos [this message]
2013-01-04 15:27     ` Bastien
2013-01-07  7:27       ` Luca Ferrari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10532.1357233900@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=fluca1978@infinito.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).