From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toby Cubitt Subject: Re: [PATCH] Separate clocksum format for durations >= 1 day Date: Tue, 6 Nov 2012 21:10:38 +0100 Message-ID: <20121106201038.GA3132@c3po> References: <87objazi6p.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]:56852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVpTg-0006oz-Ou for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 15:10:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVpTa-0005gQ-QR for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 15:10:28 -0500 Received: from sanddollar.geekisp.com ([216.168.135.167]:31559) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TVpTa-0005gJ-M1 for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 15:10:22 -0500 Content-Disposition: inline In-Reply-To: <87objazi6p.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 Tue, Nov 06, 2012 at 07:42:54PM +0100, Achim Gratz wrote: > Nicolas Goaziou writes: > > Again, these are strange and very limiting rules. What if I want to have > > "5 h 32 min"? And "5,3 days"? > > You provide a format string like you do now. That means if you want a format that's conditional on the duration, then you have to use whatever hard-coded formats are provided by the canned options. Conversely, if you want to customize the format you can't make it conditional on the duration. Same applies to regular vs. fractional if we also decide do that via canned formats, to reduce the ridiculous number of defcustoms (3) to customize this simple feature (which has also taken a ridiculous number of emails to discuss ;-) > > Achim didn't specify how he conceives the FMT argument. > > I thought that's obvious: the canned formats (the ones you'd want to use > functions for) will by symbols that the cond compares against and > anything else must be a string that can be given to format, like the > custom we have now. That also takes care of staying backwards > compatible (some folks might actually have customized that variable). > If that turns out to be too limiting we can still decide to parse > fancier format strings and feed the correct arguments into them. Including the changes in my patch, we're trying to customize three orthogonal things: 1. Conditioning what we display on the duration. 2. Regular vs. fractional minutes. 3. Customizing the formatting. Any combination of choices for these three factors is valid. 1 affects which values we compute. 2 affects how we compute one of the values. 3 affects how we display those values. Your proposal doesn't allow 3 to be customized independently of 1 and 2. But it seems Nicolas wants to get rid of customizable format strings anyway, to allow clocksum durations to be parsed back into a number of minutes (see other part of this thread). For this, a single defcustom for choosing pre-canned formats with no user-defined functions and no customizable format strings is the only (sane) option. In which case this discussion is somewhat moot. Best, 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