From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Separate clocksum format for durations >= 1 day Date: Tue, 06 Nov 2012 13:29:02 +0100 Message-ID: <871ug6ap9t.fsf@gmail.com> References: <878vaf9ey2.fsf@gmail.com> <20121106120132.GA13107@c3po> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TViLL-000552-1A for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 07:33:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TViLF-0002GM-6C for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 07:33:22 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:54787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TViLE-0002Fw-VO for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 07:33:17 -0500 Received: by mail-wi0-f171.google.com with SMTP id hj13so3004897wib.12 for ; Tue, 06 Nov 2012 04:33:16 -0800 (PST) In-Reply-To: <20121106120132.GA13107@c3po> (Toby Cubitt's message of "Tue, 6 Nov 2012 13:01:32 +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: > How do I produce the format "5 h 32 min" with your defcustom, without > requiring the user to define their own function? (Assuming that 'regular > produces the current default "5:32" format.) Why "without defining their own function"? My proposal was to use functions instead of format strings to customize output. > You still need a way to allow users to supply format strings, so they can > customize the appearance of the `regular' and `decimal' formats. Your own > "5 h 32 min" and "5,3 days" examples demonstrate this. In my proposal, customizing `regular' and `decimal' format wasn't expected. > This either implies a second defcustom for the format strings, or it > implies storing both the format strings and choice of function choice in > the same defcustom. Furthermore, one format string isn't be enough > because you might want to different numbers of placeholders depending on > the duration (which is what my original patch allowed). But let's forget about it, it's a false good idea, anyway. I'm shooting myself in the foot: custom formats mean parsing hell. So either: 1. We define a new format, non customizable, but possibly conditional, which can describe a duration, in order to include days. 2. We allow customization as overlays (much like timestamps). 3. We leave it as-is. I'm not very fond of 2, so I think this whole customization problem is moot anyway. Regards, -- Nicolas Goaziou