From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: "DONE" all subtasks recursively Date: Thu, 21 Jul 2011 22:59:09 -0400 Message-ID: <87aac7dnr6.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qk5xJ-0007mV-6o for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 22:59:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qk5xI-0002y9-65 for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 22:59:13 -0400 Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:59519 helo=mho-01-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qk5xI-0002y3-1m for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 22:59:12 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcelo de Moraes Serpa Cc: Org Mode Marcelo de Moraes Serpa 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 < > celoserpa@gmail.com> wrote: > > Hey guys >=20=20=20=20 > If I have a headline with children, like this: >=20=20=20=20 > * Project=C2=A0 > ** TODO Task > ** TODO Task=C2=A0 > ** SubProject > *** TODO Task=C2=A0 > *** TODO Task >=20=20=20=20 > 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? >=20=20=20=20 > Thanks in advance, >=20=20=20=20 > - Marcelo. >=20=20=20=20 >=20=20=20=20 >=20=20=20=20 >=20=20=20=20 > > > > --=20 Bernt