From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: [bug] how to specify the format for clock table summaries and bug in formula calculations Date: Sun, 29 Sep 2013 13:33:11 +0100 Message-ID: <87ioxjbyew.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQGBr-0003oX-B6 for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 08:33:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQGBj-0000V6-8N for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 08:33:35 -0400 Received: from am1outboundsmtppool1.messaging.microsoft.com ([213.199.180.165]:56811 helo=AM1EHSNDR001.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQGBi-0000UF-Va for emacs-orgmode@gnu.org; Sun, 29 Sep 2013 08:33:27 -0400 Received: from mail28-am1 (localhost [127.0.0.1]) by mail28-am1-R.bigfish.com (Postfix) with ESMTP id D61152601DB for ; Sun, 29 Sep 2013 12:33:19 +0000 (UTC) Received: from AM1EHSMHS014.bigfish.com (unknown [10.3.201.251]) by mail28-am1.bigfish.com (Postfix) with ESMTP id C9D3D4A0041 for ; Sun, 29 Sep 2013 12:33:18 +0000 (UTC) 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 --=-=-= Content-Type: text/plain Hello, I am clocking a number of tasks and need a summary. The functionality provided by the org-clock table is ideal for my use case. However, the total time summaries use numbers of days when the number of hours exceeds 24. Although this is fine most of the time, I would like to have total hours instead. Is this possible? More importantly, the ":formula %" option does not work as soon as days appear in the summaries! The calculations for the percentages use only the hours in the totals, regardless of the number of days leading to some very interesting results (percentages > 100). I don't know enough emacs calc to start to suggest how this could be fixed unfortunately... :( ECM attached. Any pointers appreciated! Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2-20-gc5f370 --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename="clocking.org" * clocking ** task A CLOCK: [2013-09-21 Sat 12:00]--[2013-09-21 Sat 18:00] => 6:00 CLOCK: [2013-09-19 Thu 14:49]--[2013-09-19 Thu 17:50] => 3:01 CLOCK: [2013-09-19 Thu 08:49]--[2013-09-19 Thu 11:50] => 3:01 ** task B CLOCK: [2013-09-20 Fri 08:49]--[2013-09-20 Fri 18:50] => 10:01 CLOCK: [2013-09-19 Thu 11:50]--[2013-09-19 Thu 14:40] => 2:50 ** task C CLOCK: [2013-09-18 Wed 08:00]--[2013-09-18 Wed 14:50] => 6:50 CLOCK: [2013-09-17 Tue 08:35]--[2013-09-17 Tue 18:50] => 10:15 CLOCK: [2013-09-16 Mon 08:45]--[2013-09-16 Mon 16:50] => 8:05 ** Summary #+BEGIN: clocktable :maxlevel 2 :scope file :formula % #+CAPTION: Clock summary at [2013-09-29 Sun 13:29] | Headline | Time | | % | |------------+---------+---------+-------| | *Total time* | *2d 2:03* | | 100.0 | |------------+---------+---------+-------| | clocking | 2d 2:03 | | 100.0 | | \__ task A | | 12:02 | 587.0 | | \__ task B | | 12:51 | 626.8 | | \__ task C | | 1d 1:10 | 56.9 | #+TBLFM: $4='(org-clock-time% @2$2 $2..$3);%.1f #+END: --=-=-=--