From mboxrd@z Thu Jan 1 00:00:00 1970 From: Antoine Levitt Subject: Re: Custom time display in mode-line Date: Tue, 01 May 2012 20:05:51 +0200 Message-ID: <87397jydxc.fsf@gmail.com> References: <873a25f1iy.fsf@gmail.com> <87mx5rdcig.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPHSa-000137-LB for emacs-orgmode@gnu.org; Tue, 01 May 2012 14:06:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPHSY-0006ea-KG for emacs-orgmode@gnu.org; Tue, 01 May 2012 14:05:59 -0400 In-Reply-To: <87mx5rdcig.fsf@gnu.org> (Bastien's message of "Tue, 01 May 2012 19:41:59 +0200") 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: Bastien Cc: emacs-orgmode@gnu.org Hi, Thanks for answering, 01/05/12 19:41, Bastien > Antoine Levitt writes: > >> Ideally, org-clock-modeline-total would be obsoleted and replaced by a >> org-clock-modeline-format that'd get passed to format-spec. > > Please suggest the docstring for `org-clock-modeline-format'. This > will give us a stable basis to work on. > > At this stage, I don't understand clearly enough what is buggy about > `org-clock-modeline-total'. It's not buggy, it's just not customizable enough. I'm very sensitive about what goes into my modeline. (and apparently I'm not alone) I have in mind something like mode-line-format. So for instance, the docstring would be something like: "String containing a template for displaying mode line when clock is active. The following %-constructs will be replaced: %n -- the name of the task %t -- time clocked into this task today %c -- time clocked in the current instance of the clock %a -- all time clocked for this task" Plus there should probably be stuff about repeats and effort that I don't understand because I don't use them. Other emacs packages (for instance, gnus via gnus-group-line-format and such variables) allow pretty much unlimited customization of these format strings, so it makes sense that org does too. But I'm realizing that even that is not sufficient for what I want. What I really want is complete lisp control, with access to the time clocked. For instance, I'd like to be able to display stuff like "Task1 : 00:24 today, 04:13 this week". Maybe a refactoring with more options to org-clock-get-clocked-time (for instance, accepting the same :block options as the clocktable) would be a good idea?