From mboxrd@z Thu Jan 1 00:00:00 1970 From: Derek Subject: Re: Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa /home/loic/.emacs.d/elpa/org-20140730/)] Date: Wed, 13 Aug 2014 07:51:34 +0000 (UTC) Message-ID: References: <53E87D9B.3040600@dachary.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHTOr-0006JQ-OE for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 03:55:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHTOl-0008KO-LS for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 03:55:13 -0400 Received: from plane.gmane.org ([80.91.229.3]:49518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHTOl-0008K2-Fe for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 03:55:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XHTOi-0007nS-HO for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 09:55:04 +0200 Received: from dflt1w.psi.ch ([129.129.194.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Aug 2014 09:55:04 +0200 Received: from derek.feichtinger by dflt1w.psi.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Aug 2014 09:55:04 +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: emacs-orgmode@gnu.org Hi Loic Loic Dachary dachary.org> writes: > > Hi, > > In the following clock table: > > #+BEGIN: clocktable :maxlevel 3 :emphasize nil :scope file :block 2014-08 :formula % :narrow 100 > #+CAPTION: Clock summary at [2014-08-11 lun. 10:17], for août 2014. > | <100> | | | | | > | Headline | Time | | | % | > |-------------------------------------------------------------------------- ----------------------------+------------+------+---+-------| > | *Total time* | *1d 16:04* | | | 100.0 | > |------------------------------------------------------------------------ ------------------------------+------------+------+---+-------| > | STARTED Read mail | 8:23 | | | 52.2 | > | STARTED GSoC | 0:49 | | | 5.1 | > ... > #+TBLFM: $5='(org-clock-time% 3$2 $2..$4);%.1f > #+END: clocktable > > The total time is apparently parsed as 16:04 instead of 1d 16:04 which leads to the incorrect conclusion > that 8:23 is 52.2% of the time. > > Emacs : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) > of 2014-03-07 on lamiak, modified by Debian > Package: Org-mode version 8.2.7c (8.2.7c-elpa /home/loic/.emacs.d/elpa/org-20140730/) > This is a workaround for your problem (that I also faced) in order to have the clocktables sum correctly. One just sets the time format to hours and minutes. A real bugfix naturally would be much nicer. ------- ;; format string used when creating CLOCKSUM lines and when generating a ;; time duration (avoid showing days. some clocktable functions cannot ;; digest ;; day formats, e.g. org-clock-time%) (setq org-time-clocksum-format '(:hours "%d" :require-hours t :minutes ":%02d" :require-minutes t)) -------- Cheers, Derek