emacs-orgmode
[Top][All Lists]
Advanced

[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: Fri, 09 Nov 2012 09:04:02 +0100

Toby Cubitt <address@hidden> writes:

> Minor point: I would order the format strings minutes, hours, days. In
> case we ever want to extend to months or years, that way we can simply
> extend the list and it will be completely backwards compatible.

Using a plist can circumvent the problem, too. I'm ok either way.

> One other thing that needs some thought (which I already mentioned
> previously). The minutes format string needs to change, depending on
> whether the data format is fractional or regular.

Not necessarily. The format string can use %s. We can also remind it in
the docstring of both variables and provide examples.

> So if a user wants to switch to fractional, it's not enough to set the
> first variable; they have to *also* change the minute format string.
> If they don't the durations will be garbled.

Sometimes, yes.

> A customization setter function could be used to change the value of the
> second variable when the first one is modified through customize. But
> that quickly gets complex, e.g. we have to be careful about clobbering
> any customizations the user has already made to the format strings.

That sounds too complicated.

> The simpler solution would be to always have two format strings for the
> minutes in the list: a fractional format, and a regular format. This
> shouldn't be too confusing as long as it's documented in the variable
> docstring and there are good descriptive :tags for each list element in
> the customization type.

I think this is not necessary. We can just document the fact that the
user must check both variables before applying some change. Anyway,
I let you judge this.

> Looks good to me, and lets me do what I wanted in my original patch.
>
> Now I just need to find time to code it up...

Good to hear we eventually settled on a solution !


Regards,

-- 
Nicolas Goaziou



reply via email to

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