emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Column view bugs


From: Vagn Johansen
Subject: [Orgmode] Re: Column view bugs
Date: Thu, 18 Oct 2007 22:43:09 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin)

Vagn Johansen <address@hidden> writes:

> Bastien <address@hidden> writes:
>
>> Vagn Johansen <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]