all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa @ /home/loic/.emacs.d/elpa/org-20140730/)]
@ 2014-08-11  8:23 Loic Dachary
  2014-08-13  7:51 ` Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa <at> /home/loic/.emacs.d/elpa/org-20140730/)] Derek
  0 siblings, 1 reply; 2+ messages in thread
From: Loic Dachary @ 2014-08-11  8:23 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]

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/)

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa <at> /home/loic/.emacs.d/elpa/org-20140730/)]
  2014-08-11  8:23 Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa @ /home/loic/.emacs.d/elpa/org-20140730/)] Loic Dachary
@ 2014-08-13  7:51 ` Derek
  0 siblings, 0 replies; 2+ messages in thread
From: Derek @ 2014-08-13  7:51 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-13  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11  8:23 Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa @ /home/loic/.emacs.d/elpa/org-20140730/)] Loic Dachary
2014-08-13  7:51 ` Bug: clock table total time parsed incorrectly [8.2.7c (8.2.7c-elpa <at> /home/loic/.emacs.d/elpa/org-20140730/)] Derek

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.