emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Derek <derek.feichtinger@psi.ch>
To: emacs-orgmode@gnu.org
Subject: Re: 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)	[thread overview]
Message-ID: <loom.20140813T094359-125@post.gmane.org> (raw)
In-Reply-To: 53E87D9B.3040600@dachary.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

      reply	other threads:[~2014-08-13  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140813T094359-125@post.gmane.org \
    --to=derek.feichtinger@psi.ch \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).