[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-e
From: |
Derek |
Subject: |
Re: [O] Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa <at> /home/loic/.emacs.d/elpa/org-20140730/)] |
Date: |
Wed, 13 Aug 2014 07:51:34 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hi Loic
Loic Dachary <loic <at> 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% <at> 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 <at>
/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