From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: Re: Remaining Work Report Date: Thu, 22 Mar 2012 14:33:28 +0000 Message-ID: <87limshfif.fsf@gmail.com> References: <80ehsog1gi.fsf@somewhere.org> Reply-To: emacs-orgmode@gnu.org, Myles English Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAj0s-0000IH-Nv for emacs-orgmode@gnu.org; Thu, 22 Mar 2012 10:29:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAj0n-0007RB-HL for emacs-orgmode@gnu.org; Thu, 22 Mar 2012 10:29:14 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:44395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAj0n-0007Qo-8D for emacs-orgmode@gnu.org; Thu, 22 Mar 2012 10:29:09 -0400 Received: by werj55 with SMTP id j55so2409624wer.0 for ; Thu, 22 Mar 2012 07:29:06 -0700 (PDT) In-Reply-To: <80ehsog1gi.fsf@somewhere.org> (Sebastien Vauban's message of "Mon, 19 Mar 2012 14:33:17 +0100") 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: Sebastien Vauban Cc: emacs-orgmode Mode 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. Myles