all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vagn Johansen <ozymandias.dk@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Column view bugs
Date: Thu, 18 Oct 2007 22:43:09 +0200	[thread overview]
Message-ID: <m27ilkf92a.fsf@gmail.com> (raw)
In-Reply-To: m2bqazf1vl.fsf@gmail.com

Vagn Johansen <ozymandias.dk@gmail.com> writes:

> Bastien <bzg@altern.org> writes:
>
>> Vagn Johansen <ozymandias.dk@gmail.com> 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	other threads:[~2007-10-18 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-13  6:44 Column view bugs Scott Jaderholm
2007-10-13  9:28 ` Carsten Dominik
2007-10-13 13:50   ` Bastien
2007-10-14 19:54     ` Vagn Johansen
2007-10-16  0:03       ` Bastien
2007-10-16 16:41         ` Vagn Johansen
2007-10-18 20:43           ` Vagn Johansen [this message]
2007-10-15 21:46   ` Daniel J. Sinder
2007-10-13 16:13 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m27ilkf92a.fsf@gmail.com \
    --to=ozymandias.dk@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.