[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: Nicolas Goaziou
Subject: Re: [O] [PATCH] Separate clocksum format for durations >= 1 day
Date: Tue, 06 Nov 2012 13:29:02 +0100

Toby Cubitt <address@hidden> writes:

> How do I produce the format "5 h 32 min" with your defcustom, without
> requiring the user to define their own function? (Assuming that 'regular
> produces the current default "5:32" format.)

Why "without defining their own function"? My proposal was to use
functions instead of format strings to customize output.

> You still need a way to allow users to supply format strings, so they can
> customize the appearance of the `regular' and `decimal' formats. Your own
> "5 h 32 min" and "5,3 days" examples demonstrate this.

In my proposal, customizing `regular' and `decimal' format wasn't

> This either implies a second defcustom for the format strings, or it
> implies storing both the format strings and choice of function choice in
> the same defcustom. Furthermore, one format string isn't be enough
> because you might want to different numbers of placeholders depending on
> the duration (which is what my original patch allowed).

But let's forget about it, it's a false good idea, anyway. I'm shooting
myself in the foot: custom formats mean parsing hell. So either:

1. We define a new format, non customizable, but possibly conditional,
   which can describe a duration, in order to include days.

2. We allow customization as overlays (much like timestamps).

3. We leave it as-is.

I'm not very fond of 2, so I think this whole customization problem is
moot anyway.


Nicolas Goaziou

reply via email to

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