From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [PATCH] Separate clocksum format for durations >= 1 day Date: Mon, 05 Nov 2012 18:40:20 +0100 Message-ID: <87wqy0vth7.fsf@Rainer.invalid> References: <87wqy0ckbj.fsf@gmail.com> <20121105125528.GA19566@c3po> <87k3u0chus.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVQfE-0003wx-4k for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 12:40:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVQf6-0001dI-Hf for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 12:40:44 -0500 Received: from plane.gmane.org ([80.91.229.3]:40067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVQf6-0001dC-Ax for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 12:40:36 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TVQfA-0006Kc-FW for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 18:40:40 +0100 Received: from pd9eb505e.dip.t-dialin.net ([217.235.80.94]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Nov 2012 18:40:40 +0100 Received: from Stromeko by pd9eb505e.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Nov 2012 18:40:40 +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 Nicolas Goaziou writes: > Then let's wait for Achim (Cc'ed) to illustrate what he has in mind, > because his proposal is too vague yet to permit discussion about it. What I had in mind was to remove org-time-clocksum-format and replace the associated format calls with a formatting function that has customizable behaviour (how customizable is t.b.d.). (format org-time-clocksum-format h m) => (org--format-time n fmt) Even if nothing else changes, that removes a lot of unnecessary code duplication, like the seven or so different ways to split the hours from the minutes that may or may not agree on their results. This is not far from your own suggestion to provide different functions depending on which output is desired, I just happen to think that these functions would all be so similar that they should be rolled into a single function that can produce different outputs. I think there'd only be a handful of possible values for fmt based on the current usage and that suggests just another cond form would be needed in implementing this function rather than a full-blown format string interpreter. The fmt argument might even be optional (use the custom value if nil) or dynamically bound instead of being a function argument. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Waldorf MIDI Implementation & additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs