From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Separate clocksum format for durations >= 1 day Date: Sat, 17 Nov 2012 09:48:09 +0100 Message-ID: <877gpkpqd2.fsf@gmail.com> References: <20121114162014.GA13397@c3po> <20121116151244.GA8639@c3po> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZe8a-0001mh-1u for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 03:52:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZe8W-00036H-WD for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 03:52:27 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:39695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZe8W-000368-Pj for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 03:52:24 -0500 Received: by mail-wg0-f41.google.com with SMTP id ds1so290031wgb.0 for ; Sat, 17 Nov 2012 00:52:23 -0800 (PST) In-Reply-To: <20121116151244.GA8639@c3po> (Toby Cubitt's message of "Fri, 16 Nov 2012 16:12:44 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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. > 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. Regards, -- Nicolas Goaziou