From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vagn Johansen Subject: Re: Column view bugs Date: Thu, 18 Oct 2007 22:43:09 +0200 Message-ID: References: <6befca6f021e58dcdaab748fe501edec@science.uva.nl> <874pgvktt4.fsf@bzg.ath.cx> <87tzoshqo2.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IicDq-0003HA-M8 for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 16:44:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IicDo-0003Ep-OE for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 16:44:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IicDo-0003EQ-Hy for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 16:44:00 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IicDn-0006GB-Lb for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 16:43:59 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IicDe-0005xV-8w for emacs-orgmode@gnu.org; Thu, 18 Oct 2007 20:43:50 +0000 Received: from 0x5551567a.adsl.cybercity.dk ([85.81.86.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Oct 2007 20:43:50 +0000 Received: from ozymandias.dk by 0x5551567a.adsl.cybercity.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Oct 2007 20:43:50 +0000 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 Vagn Johansen writes: > Bastien writes: > >> Vagn Johansen writes: >> >>> I could also see a use for a state-dependent {:}. Display the sum of >>> times and also the sum of times for tasks that are DONE. E.g. for >>> adding time-estimates and measuring progress. Or maybe add up the >>> not-DONEs to show the remaining time. >> >> Isn't this already achievable with a clever todo/archive structure? > > Sort of. But I do not want to be forced to use a specific structure. > > Also it gives incorrect sums if you havee subproject with with mixed > TODO and DONE tasks. > I discovered that is easy to just copy the Time_Estimate value to Time_Spent for those tasks that are DONE. (save-excursion (goto-char (point-min)) ;; For each node (while (re-search-forward (concat "^" outline-regexp) nil t) ;; If task is done and there is no Time_Spent property (if (and (equal (org-entry-get (point) "TODO") "DONE") (not (org-entry-get (point) "Time_Spent"))) ;; Add Time_Spent property with the value from the ;; Time_Estimate property if available or 999000 (org-entry-put (point) "Time_Spent" (or (org-entry-get (point) "Time_Estimate") "999000"))))) -- Vagn Johansen