On Wed, Nov 14, 2012 at 05:20:14PM +0100, Toby Cubitt wrote: > On Wed, Nov 14, 2012 at 05:09:38PM +0100, Nicolas Goaziou wrote: > > Toby Cubitt writes: > > > > > I can easily allow org-time-clocksum-fractional-format to be a list of > > > formats. But "1d 3.4h" doesn't seem very useful to me. Probably it should > > > work a bit differently: format the time as a fractional quantity, using > > > the largest time unit which will give a non-zero integer part. > > > > > > Does that sound reasonable? > > > > That's the idea, yes. Though, it will be the largest time unit _with > > a format string_ which will give a non-zero integer part. > > Yes, that's what I meant. > > > > OK, but in this case I think the single-format-string option is still > > > useful. It gives users a simpler way of customizing the format if they > > > don't want to do anything fancy. > > > > If they don't want to do anything fancy, they use the default value, > > whatever it may be. ;) I don't mind keeping the single format string > > option anyway. > > I'll leave it in my patch. If you want to remove it for 8.0, it'll be a > simple case of deleting some code. > > > > I'll post an updated patch when I get time to make the changes. > > > > Since it's for 8.0, there's no hurry. I'll wait for you to merge the two > > patches and make subsequent changes. Here's an updated patch. Now both org-time-clocksum-format and org-time-clocksum-fractional-format can be plists, as discussed. In the org-time-clocksum-format case, I made the values cons cells which specify both a format string and a boolean. The latter indicates whether the time component should always be included in the formatted duration, even if its value is 0. This is needed for the hours component to reproduce the current default format, and I figured I might as well make it general. I used a somewhat complex customization type in the defcustoms, instead of a straight plist, in order to produce a better ui for the customization interface. I'm still not completely satisfied with it. E.g. it would be nice to get rid of the "Cons cell" tag entirely, and use a checkbox for the boolean. But I can't figure out how to do that (without defining new customization types/widgets, which I don't have the patience for). Toby -- Dr T. S. Cubitt Mathematics and Quantum Information group Department of Mathematics Complutense University Madrid, Spain email: tsc25@cantab.net web: www.dr-qubit.org