emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alessandro Pacaccio <alessandro.pacaccio@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Automatic change of TODO
Date: Wed, 4 Nov 2009 13:54:11 +0000 (UTC)	[thread overview]
Message-ID: <loom.20091104T145023-111@post.gmane.org> (raw)

Hi!

I've an outline like this:

* Project A
** TODO Task A-1 [0/3]
*** TODO Subtask A-1-a
*** TODO Subtask A-1-b
*** TODO Subtask A-1-c

where level 1 heading is the name of a project, level 2 heading is a generic
task broken into three level 3 headings.
As suggested in section 5.5 of the manual, I've hooked the org-summary-todo
function to org-after-todo-statistics-hook, in order to automatically change the
level 2 TODO to DONE when all the subtasks are DONE.
Unfortunately, when I change to DONE the first subtask, an unexpected TODO is
added to level 1 heading:

* TODO Project A
** TODO Task A-1 [1/3]
*** DONE Subtask A-1-a
*** TODO Subtask A-1-b
*** TODO Subtask A-1-c

From now on, the switch TODO->DONE or DONE/TODO applies to level 1 heading, even
if the [/] cookie in level 2 is correctly updated:

* DONE Project A
** TODO Task A-1 [3/3]
*** DONE Subtask A-1-a
*** DONE Subtask A-1-b
*** DONE Subtask A-1-c

Is there a way to apply the automatic change of TODO to the parent heading only,
as below?

* Project A
** DONE Task A-1 [3/3]
*** DONE Subtask A-1-a
*** DONE Subtask A-1-b
*** DONE Subtask A-1-c

Thank you.
- Alessandro

             reply	other threads:[~2009-11-04 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 13:54 Alessandro Pacaccio [this message]
2009-11-05  7:05 ` Automatic change of TODO Carsten Dominik
2009-11-05 11:12   ` Alessandro Pacaccio
2009-11-05 12:18     ` Carsten Dominik
2009-11-05 13:06       ` org-latest (was:Re: Re: Automatic change of TODO) Giovanni Ridolfi

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=loom.20091104T145023-111@post.gmane.org \
    --to=alessandro.pacaccio@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).