> 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