From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toby Cubitt Subject: Re: [PATCH] Separate clocksum format for durations >= 1 day Date: Mon, 5 Nov 2012 12:01:29 +0100 Message-ID: <20121105110129.GA9332@c3po> References: <878vagxr67.fsf@Rainer.invalid> Reply-To: Toby Cubitt Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVKQj-00015c-Gb for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 06:01:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVKQe-0001Ul-Pe for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 06:01:21 -0500 Received: from starfish.geekisp.com ([216.168.135.166]:11432) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TVKQe-0001UV-K7 for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 06:01:16 -0500 Content-Disposition: inline In-Reply-To: <878vagxr67.fsf@Rainer.invalid> 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 On Mon, Nov 05, 2012 at 11:47:12AM +0100, Achim Gratz wrote: > Nicolas Goaziou writes: > > As you suggest, I think a better plan is to replace all of them with > > a single `org-time-clocksum-display-function'. Its expected value would > > be a function accepting 2 arguments: hours and minutes, as numbers and > > it should return a string. > > Actually, it seems an even better plan IMHO to just have one single > function that takes a format string and the total time in minutes or > seconds and allow customization of the format string. A format string isn't sufficient. It requires the number of time components (days, hours, minutes, etc.) to be fixed in advance. Whereas a function can decide whether to display e.g. days+hours or hours+minutes depending on whether the time is longer or shorter than 24h. A defcustom that can either be a format string *or* a function might be an option. Or maybe I've misunderstood what you're proposing? 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