[Top][All Lists]

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

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

From: Toby Cubitt
Subject: Re: [O] [PATCH] Separate clocksum format for durations >= 1 day
Date: Tue, 6 Nov 2012 21:10:38 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Nov 06, 2012 at 07:42:54PM +0100, Achim Gratz wrote:
> Nicolas Goaziou writes:
> > Again, these are strange and very limiting rules. What if I want to have
> > "5 h 32 min"? And "5,3 days"?
> You provide a format string like you do now.

That means if you want a format that's conditional on the duration, then
you have to use whatever hard-coded formats are provided by the canned
options. Conversely, if you want to customize the format you can't make
it conditional on the duration.

Same applies to regular vs. fractional if we also decide do that via
canned formats, to reduce the ridiculous number of defcustoms (3) to
customize this simple feature (which has also taken a ridiculous number
of emails to discuss ;-)

> > Achim didn't specify how he conceives the FMT argument.
> I thought that's obvious: the canned formats (the ones you'd want to use
> functions for) will by symbols that the cond compares against and
> anything else must be a string that can be given to format, like the
> custom we have now.  That also takes care of staying backwards
> compatible (some folks might actually have customized that variable).
> If that turns out to be too limiting we can still decide to parse
> fancier format strings and feed the correct arguments into them.

Including the changes in my patch, we're trying to customize three
orthogonal things:

1. Conditioning what we display on the duration.

2. Regular vs. fractional minutes.

3. Customizing the formatting.

Any combination of choices for these three factors is valid. 1 affects
which values we compute. 2 affects how we compute one of the values. 3
affects how we display those values.

Your proposal doesn't allow 3 to be customized independently of 1 and 2.

But it seems Nicolas wants to get rid of customizable format strings
anyway, to allow clocksum durations to be parsed back into a number of
minutes (see other part of this thread). For this, a single defcustom for
choosing pre-canned formats with no user-defined functions and no
customizable format strings is the only (sane) option. In which case this
discussion is somewhat moot.

Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

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

reply via email to

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