[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: Sat, 17 Nov 2012 09:48:09 +0100

Toby Cubitt <address@hidden> 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.

> 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.

> +                  (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.


Nicolas Goaziou

reply via email to

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