From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Custom time display in mode-line Date: Sun, 17 Jan 2010 11:50:45 +0100 Message-ID: <873a25f1iy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWSiW-0006cH-3v for emacs-orgmode@gnu.org; Sun, 17 Jan 2010 05:50:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWSiR-0006Zy-DV for emacs-orgmode@gnu.org; Sun, 17 Jan 2010 05:50:47 -0500 Received: from [199.232.76.173] (port=51021 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWSiR-0006Zo-2V for emacs-orgmode@gnu.org; Sun, 17 Jan 2010 05:50:43 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:51050) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWSiO-0000uX-UH for emacs-orgmode@gnu.org; Sun, 17 Jan 2010 05:50:41 -0500 Received: by ewy24 with SMTP id 24so2439362ewy.26 for ; Sun, 17 Jan 2010 02:50:39 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode Mailinglist Hi org-clock-modeline-total now accepts following values: current, today, re= peat, all, auto. It would be useful to allow it to accept either a custom function or a fo= rmat string which composes a text string like: "0:10 (tot: 1:10/2:00)" meaning: =E2=80=9Eclocking 10 minutes in this session, but the total cloc= ked time (including those 10min) is 1:10, and the effort estimate is 2:00= =E2=80=9C. Not all entries have a =E2=80=9Etotal clocked time=E2=80=9C (: entries cl= ocked for the first time) and not all entries have an estimate. - Either many format strings must be given (_simple, _with_total, _with_est= imate, _with_total_and_estimate), e.g. ("%current" "%current (tot: %total)"= "%current/%estimate" "%current (tot:%total/%estimate)") - =E2=80=A6 or we must cope with results like "0:10 (tot: /)" - =E2=80=A6 or a custom function must be used to do those conditionals. Accepting a function would be like redefining org-clock-get-clock-string = but without touching org's core. I tried to change the code but I'm confused as to why org-clock-modeline-= total (a mere visualization/=E2=80=9Eview=E2=80=9C setting) is read in org-= clock-get-sum-start (which is a =E2=80=9Emodel=E2=80=9C/core function and t= herefore not tied to any particular =E2=80=9Eview=E2=80=9C). I think org-cl= ock-modeline-total should be read just in org-clock-get-clock-string. Documentation of org-clock-get-clocked-time is also wrong (=E2=80=9EThe t= ime returned includes the time spent on this task in previous clocking inte= rvals.=E2=80=9C) since this depends on what org-clock-get-sum-start did. -- Daniel