From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aankhen Subject: Re: "DONE" all subtasks recursively Date: Thu, 21 Jul 2011 14:19:31 +0530 Message-ID: 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]:50476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjoxA-0003gO-5P for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 04:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qjox5-00013i-SF for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 04:49:56 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:53898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qjox5-00013d-Oe for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 04:49:51 -0400 Received: by vws4 with SMTP id 4so959689vws.0 for ; Thu, 21 Jul 2011 01:49:51 -0700 (PDT) In-Reply-To: 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 , Org mailing list Hello Marcelo, On Wed, Jul 20, 2011 at 21:11, Marcelo de Moraes Serpa 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 > 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 m= ain >> parent headline? You can use =E2=80=98org-map-region=E2=80=99 to call a function on every he= adline in a region. =E2=80=98org-end-of-subtree=E2=80=99 will move point to=E2=80=A6 we= ll, the end of the current subtree. Finally, =E2=80=98org-todo=E2=80=99 is what changes the t= odo state of the headline containing point. Add your custom function to either =E2=80=98org-after-todo-state-change-hook=E2=80=99[1] or =E2=80=98org-trigg= er-hook=E2=80=99.[2] (I=E2=80=99m 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