From: Aankhen <aankhen@gmail.com>
To: Marcelo de Moraes Serpa <celoserpa@gmail.com>,
Org mailing list <emacs-orgmode@gnu.org>
Subject: Re: "DONE" all subtasks recursively
Date: Thu, 21 Jul 2011 14:19:31 +0530 [thread overview]
Message-ID: <CAKXcKvdkqw0gAoXs3TvgrBV2rbzLxdHRk8Xe_0vgV77zRKpvcA@mail.gmail.com> (raw)
In-Reply-To: <CACHMzOHcusAQsx725p0aj0BhuN_BkdHp9Ao6GyHTiTrkdyzB8Q@mail.gmail.com>
Hello Marcelo,
On Wed, Jul 20, 2011 at 21:11, Marcelo de Moraes Serpa
<celoserpa@gmail.com> wrote:
> *bump*
> Hey guys, if someone could guide me a hint on where I should look to hack
> some elisp code in order to do that, I'd be grateful ;)
> Cheers,
> Marcelo.
>
> On Mon, Jul 18, 2011 at 1:30 PM, Marcelo de Moraes Serpa
> <celoserpa@gmail.com> wrote:
>>
>> Hey guys
>> If I have a headline with children, like this:
>> * Project
>> ** TODO Task
>> ** TODO Task
>> ** SubProject
>> *** TODO Task
>> *** TODO Task
>> Does org have any functionality that allows me to automatically close
>> (Change TODO->DONE, put DONE when TODO is not available (in the case of
>> Projects)) automatically and recursively for each child if I close the main
>> parent headline?
You can use ‘org-map-region’ to call a function on every headline in a
region. ‘org-end-of-subtree’ will move point to… well, the end of the
current subtree. Finally, ‘org-todo’ is what changes the todo state
of the headline containing point.
Add your custom function to either
‘org-after-todo-state-change-hook’[1] or ‘org-trigger-hook’.[2] (I’m
not sure what the difference is.)
Happy hacking!
Aankhen
[1]: http://orgmode.org/worg/org-configs/org-hooks.html#sec-1_13
[2]: http://orgmode.org/worg/org-configs/org-hooks.html#sec-1_15
next prev parent reply other threads:[~2011-07-21 8:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 18:30 "DONE" all subtasks recursively Marcelo de Moraes Serpa
2011-07-20 15:41 ` Marcelo de Moraes Serpa
2011-07-21 8:49 ` Aankhen [this message]
2011-07-22 2:59 ` Bernt Hansen
2011-07-22 13:52 ` Bastien
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=CAKXcKvdkqw0gAoXs3TvgrBV2rbzLxdHRk8Xe_0vgV77zRKpvcA@mail.gmail.com \
--to=aankhen@gmail.com \
--cc=celoserpa@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).