On Sat, Nov 17, 2012 at 09:48:09AM +0100, Nicolas Goaziou wrote: > Toby Cubitt writes: > > > Here's an updated patch. Now both org-time-clocksum-format and > > org-time-clocksum-fractional-format can be plists, as discussed. > > That was quick. Thank you. > > > 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 understand. It is a necessary evil. Though, instead of asking for cons > cells, maybe the boolean could be provided as another property. I.e. > > '(:hour "..." :persistent-hour t) > > would be a replacement for: > > '(:hour ("..." . t)) > > And, better, > > '(:hour "...") > > would the become a replacement for > > '(:hour ("..." . nil)) > > What do you think about it? The name of the property is only a > suggestion. Good idea. I agree, additional keys are cleaner than cons cells. > > 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). > > The advantage of the method above it that it would /de facto/ get rid of > the "Cons cell" tag. I've replaced the cons cells with additional plist properties, as you suggested. The resulting customization ui still isn't wonderful in my opinion. But it does the job, and I'm not sure how much scope there is for improving it further. If you see a way, by all means feel free to make the changes yourself. I really don't mind what format you go with for org-time-clocksum-format, as long as it supports the new formatting features implemented in the patch. > > + (org-add-props (concat (format "%s " (make-string l ?*)) > > + (org-minutes-to-clocksum-string time) > > + (format "%s" (make-string (- 16 l) ?\ ))) > > You forgot to change that. Ooops. Fixed in the attached version. 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