[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: |
Toby Cubitt |
Subject: |
Re: [O] [PATCH] Separate clocksum format for durations >= 1 day |
Date: |
Sat, 17 Nov 2012 15:00:44 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Nov 17, 2012 at 09:48:09AM +0100, Nicolas Goaziou wrote:
> 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.
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: address@hidden
web: www.dr-qubit.org
0001-Allow-more-flexible-customization-of-clocksum-format.patch
Description: Text Data
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, (continued)
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Nicolas Goaziou, 2012/11/07
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/08
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Nicolas Goaziou, 2012/11/09
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/13
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Nicolas Goaziou, 2012/11/14
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/14
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Nicolas Goaziou, 2012/11/14
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/14
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/16
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Nicolas Goaziou, 2012/11/17
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day,
Toby Cubitt <=
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Nicolas Goaziou, 2012/11/17
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/17
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Mike McLean, 2012/11/20
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/20
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Nicolas Goaziou, 2012/11/20
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Mike McLean, 2012/11/21
- [O] [bug] Separate clocksum format for durations >= 1 day, Sebastien Vauban, 2012/11/30
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Achim Gratz, 2012/11/06
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Toby Cubitt, 2012/11/06
- Re: [O] [PATCH] Separate clocksum format for durations >= 1 day, Achim Gratz, 2012/11/06