From: Lawrence Mitchell <wence@gmx.li>
To: emacs-orgmode@gnu.org
Subject: Re: Effort entry and confusing effort estimates
Date: Tue, 21 May 2013 12:52:58 +0100 [thread overview]
Message-ID: <8761yc5z39.fsf@gmx.li> (raw)
In-Reply-To: 87r4h0ehw1.fsf@bzg.ath.cx
Bastien wrote:
> Hi Ken,
> Ken Mankoff <mankoff@gmail.com> writes:
>> But I'm still confused what 'org-set-effort' expects/interprets
>> compared to 'org-clock-modify-effort-estimate'. Any clarification
>> will be much appreciated.
> `org-set-effort' allows you to _set_ the effort value.
> `org-clock-modify-effort-estimate' allows you to either set the effort
> value (e.g. if you enter 1:30, the old value will be replaced by this
> one) or to increment/decrement the effort value by using +mm or
> +n[hdwmy] -- e.g. entering +1d will increment the current value by 1
> day. "1 day" is interpreted depending on `org-effort-durations',
> which see.
I think the problem is slightly more complicated.
org-set-effort does:
read some effort duration
(org-entry-put nil "Effort" duration-we-just-read)
org-clock-modify-effort-estimate does:
read some effort duration
(org-duration-string-to-minutes value)
convert this duration in minutes back to a string
(org-minutes-to-clocksum-string minutes-corresponding-to-value)
(org-entry-put nil "Effort" duration-we-just-calculated)
So org-set-effort doesn't do any conversion of the effort string
we enter.
org-clock-modify-effort-estimate does do conversion. However, it
does it badly.
org-duration-string-to-minutes always uses org-effort-durations
to convert the input string to minutes. However,
org-minutes-to-clocksum-string /only/ uses org-effort-durations
if org-time-clocksum-use-effort-durations is non-nil (not the
default).
The problem boils down to:
(let ((org-time-clocksum-use-effort-durations nil))
(= (org-duration-string-to-minutes "3d 2h") ;; what the user entered
(org-duration-string-to-minutes ;; what gets inserted
(org-minutes-to-clocksum-string
(org-duration-string-to-minutes "3d 2h")))))
=> nil
(let ((org-time-clocksum-use-effort-durations t))
(= (org-duration-string-to-minutes "3d 2h") ;; what the user entered
(org-duration-string-to-minutes ;; what gets inserted
(org-minutes-to-clocksum-string
(org-duration-string-to-minutes "3d 2h")))))
=> t
I would argue that
(org-duration-string-to-minutes
(org-minutes-to-clocksum-string
(org-duration-string-to-minutes some-value)))
Should be a no-op. But that is only the case if
org-time-clocksum-use-effort-durations is t.
Lawrence
--
Lawrence Mitchell <wence@gmx.li>
next prev parent reply other threads:[~2013-05-21 11:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 0:32 Effort entry and confusing effort estimates Ken Mankoff
2013-05-21 3:22 ` Ken Mankoff
2013-05-21 10:39 ` Bastien
2013-05-21 11:52 ` Lawrence Mitchell [this message]
2013-05-21 12:22 ` Bastien
2013-05-28 11:13 ` [PATCH] Remove org-time-clocksum-use-effort-durations Lawrence Mitchell
2013-05-21 13:10 ` Effort entry and confusing effort estimates Ken Mankoff
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761yc5z39.fsf@gmx.li \
--to=wence@gmx.li \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).