[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] "DONE" all subtasks recursively
From: |
Bernt Hansen |
Subject: |
Re: [O] "DONE" all subtasks recursively |
Date: |
Thu, 21 Jul 2011 22:59:09 -0400 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) |
Marcelo de Moraes Serpa <address@hidden> writes:
> *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.
--8<---------------cut here---------------start------------->8---
(defun bh/mark-subtree-done ()
(interactive)
(org-mark-subtree)
(let ((limit (point)))
(save-excursion
(exchange-point-and-mark)
(while (> (point) limit)
(org-todo "DONE")
(outline-previous-visible-heading 1))
(org-todo "DONE"))))
--8<---------------cut here---------------end--------------->8---
Then M-x bh/mark-subtree-done.
This relies on the subtasks all being visible. You can enhance it so it
handles folded tasks if needed.
-Bernt
>
> On Mon, Jul 18, 2011 at 1:30 PM, Marcelo de Moraes Serpa <
> address@hidden> 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?
>
> Thanks in advance,
>
> - Marcelo.
>
>
>
>
>
>
>
>
--
Bernt