From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: Remaining Work Report Date: Sat, 24 Mar 2012 19:58:46 +0530 Message-ID: References: <80ehsog1gi.fsf@somewhere.org> <87limshfif.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBRy6-0004Cd-Rx for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 10:29:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBRy5-0002Jg-3Y for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 10:29:22 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:49348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBRy4-0002JV-Sa for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 10:29:21 -0400 Received: by iajr24 with SMTP id r24so7477193iaj.0 for ; Sat, 24 Mar 2012 07:29:17 -0700 (PDT) In-Reply-To: <87limshfif.fsf@gmail.com> 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: emacs-orgmode@gnu.org, Myles English Cc: Sebastien Vauban > On Thu, Mar 22, 2012 at 8:03 PM, Myles English wrote: > > Hi Sebastian, > > >> On Mon, 19 Mar 2012 14:33:17 +0100, Sebastien Vauban said: > > > #+COLUMNS: %40ITEM(Task) %6Effort(Estim.){:} * Context > > > The question I'm trying to give an answer to is: *what's the > > remaining number of hours (or days) to finish my project*? > > I have just been through this myself so I hope I will be able to > help. > > To exclude DONE items from the columnview I moved the Effort > property out of the way to the Old_Effort property when the state > changes to DONE: > > ,----------------------------------------------------------------------------------------------- > | (require 'org) > | (defun my-move-effort-if-done () > | "For TOC style columnview table. Don't want to include DONE > | items in the TODO Effort column so copy Effort to Old_Effort > | property" > | (interactive) > | ( when (string= (org-get-todo-state) "DONE") > | (member (org-get-todo-state) org-done-keywords) > | ;; check if changing to DONE > | (org-entry-put nil "Old_Effort" (org-get-effort)) > | ;; get the :Effort: property > | ;(message (format "Got: %s when changin to %s" ( org-get-effort ) (org-get-todo-state))) > | (setq org-clock-effort (org-get-effort)) > | (org-entry-delete nil "Effort"))) > | > | (setq org-after-todo-state-change-hook nil) > | > | (add-hook 'org-after-todo-state-change-hook > | 'my-move-effort-if-done) > `----------------------------------------------------------------------------------------------- > > Unlike your example I made heavy use of inline tasks and also wanted > heading numbers instead of asterisks, so that the final table looks > like a table of contents with estimated times remaining. I had to > do some more things to achieve this and can elaborate if you like. > This is a very nice solution. Please do elaborate on the other steps when you have time. Cheers! -- Manish