[Top][All Lists]

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

[O] [PATCH] Separate clocksum format for durations >= 1 day

From: Toby Cubitt
Subject: [O] [PATCH] Separate clocksum format for durations >= 1 day
Date: Sat, 27 Oct 2012 16:01:56 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Personally, I find the time duration "123:15" much harder to parse
mentally than "5d 3:15".

The attached patch adds a new customization option
`org-time-clocksum-days-format'. When non-nil, this is used instead of
`org-time-clocksum-format' for clocksum durations longer than 1 day. It
gets passed three values: # days, # hours, # mins. (Note that you don't
have to use all three in the format if, say, you don't feel the need to
display the minutes for such long durations.)

In the patch, I've set the default value for this new customization
option to a non-nil value. If you prefer to keep the current behaviour as
the default, just make the default value nil.


PS: I guess the logical extrapolation of this is to add even more
`org-time-clocksum-[months|years|decades]-format' options. (Or, probably
better, abandon printf formats for long durations and just add an
`org-time-clocksum-format-function' option, leaving it up users to define
a function to format the time as they wish.)

I haven't done this in the patch, because I think "64d 3:15" is no harder
to parse than "2m 4d 3:15" (plus there's the thorny issue of how many
days should be in a month). And by the time you get to "535d 3:15"
vs. "2y 5d 3:15", the duration is so long that you probably don't care
much about the exact value, except that it's a very long-running task
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: address@hidden
web:   www.dr-qubit.org

Attachment: 0001-Allow-separate-format-for-clocksum-lines-longer-than.patch
Description: Text Data

reply via email to

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