emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Ab Cd <nati_cdg@yahoo.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: About headlines, checkboxes and heritage
Date: Fri, 06 Jan 2012 14:40:12 +0100	[thread overview]
Message-ID: <87pqext0eb.fsf@gmail.com> (raw)
In-Reply-To: <1325785260.90346.YahooMailNeo@web29901.mail.ird.yahoo.com> (Ab Cd's message of "Thu, 5 Jan 2012 17:41:00 +0000 (GMT)")

Hello,

Ab Cd <nati_cdg@yahoo.fr> writes:

> Please consider the following file :
>
> * TODO working
> ** TODO 1st part of the work
>    CLOCK: [2012-01-05 jeu. 17:18]
>
> ** TODO second part of the work [0/3]
>    - [ ] Task 1
>      - [ ] Subtask 1
>      - [ ] Subtask 2
>      - [ ] Subtask 3
>    - [ ] Task 2
>    - [ ] Task 3
>
> But why shoudln't a TODO headline containing only checkbox that are
> all completed ([3/3] in this case) be switched to done?

Because lists and headlines are mostly unrelated. There's no particular
reason that completing all tasks from the list should end the second
part of the work. There might be some things left to be done, like
writing a report... many things that Org can't guess. It's up to the
user to tell when it is appropriate to close the task.

Now, if the automatic closing of tasks fits your needs, you can make it
possible with an appropriate value for `org-checkbox-statistics-hook'.

> Also, why can't I toggle "Task 1" ? Let's assume I was away from my
> computer when completing some or all of the subtasks. I would really
> like to check Task 1 and have all the Subtasks checked automatically.

Mark region between "Task 1" and Subtask 3, then use C-c C-x C-b

> One last thing. I also think I would be nice that, if I switch "second
> part of the work" to DONE, the counter would be set to [3/3] and all
> the tasks and subtasks be checked as done.

You want to treat lists as lesser headlines, which they are not. At
least by default.

Though, you can use `org-after-todo-state-change-hook' to call, each
time a state change to a "done"-like keyword, `org-toggle-checkbox' on
the headline (provided the first check-box in the section is unchecked).


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2012-01-06 13:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 17:36 (no subject) Ab Cd
2012-01-05 17:41 ` About headlines, checkboxes and heritage Ab Cd
2012-01-06 13:40   ` Nicolas Goaziou [this message]

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=87pqext0eb.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nati_cdg@yahoo.fr \
    /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).