From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alessandro Pacaccio Subject: Automatic change of TODO Date: Wed, 4 Nov 2009 13:54:11 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5gpU-0003r7-Hu for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 09:27:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5gpP-0003om-OW for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 09:27:20 -0500 Received: from [199.232.76.173] (port=51145 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5gpP-0003oX-9c for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 09:27:15 -0500 Received: from lo.gmane.org ([80.91.229.12]:55022) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N5gpO-0006Z7-LJ for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 09:27:15 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N5gnJ-00048P-Ly for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 15:25:05 +0100 Received: from 217.26.87.7 ([217.26.87.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2009 15:25:05 +0100 Received: from alessandro.pacaccio by 217.26.87.7 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2009 15:25:05 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi! I've an outline like this: * Project A ** TODO Task A-1 [0/3] *** TODO Subtask A-1-a *** TODO Subtask A-1-b *** TODO Subtask A-1-c where level 1 heading is the name of a project, level 2 heading is a generic task broken into three level 3 headings. As suggested in section 5.5 of the manual, I've hooked the org-summary-todo function to org-after-todo-statistics-hook, in order to automatically change the level 2 TODO to DONE when all the subtasks are DONE. Unfortunately, when I change to DONE the first subtask, an unexpected TODO is added to level 1 heading: * TODO Project A ** TODO Task A-1 [1/3] *** DONE Subtask A-1-a *** TODO Subtask A-1-b *** TODO Subtask A-1-c >From now on, the switch TODO->DONE or DONE/TODO applies to level 1 heading, even if the [/] cookie in level 2 is correctly updated: * DONE Project A ** TODO Task A-1 [3/3] *** DONE Subtask A-1-a *** DONE Subtask A-1-b *** DONE Subtask A-1-c Is there a way to apply the automatic change of TODO to the parent heading only, as below? * Project A ** DONE Task A-1 [3/3] *** DONE Subtask A-1-a *** DONE Subtask A-1-b *** DONE Subtask A-1-c Thank you. - Alessandro