all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joost Helberg <joost@snow.nl>
To: emacs-orgmode@gnu.org
Subject: error in calculating percentages in clocktables
Date: Mon, 29 Nov 2010 11:56:16 +0100 (CET)	[thread overview]
Message-ID: <20101129.115616.179398633.joost@snow.nl> (raw)

ls,

I'm using clocktables and encountered an issue in calculating the
percentage in the last column. Some columns have moved 1 left in the
head-revision, but the generated formula was not changed. 
Hence the following patch. The percentages come out OK with this
patch. 

Can someone using clocktables verify that this patch is correct and
doesn't break other stuff? 

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index eb859df..0c7c73b 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2173,9 +2173,9 @@ from the dynamic block defintion."
 	     (format
 	      "\n#+TBLFM: $%d='(org-clock-time%% @%d$%d $%d..$%d);%%.1f"
 	      pcol
-	      (+ 2 (if narrow 1 0))
-	      (+ 3 (if multifile 1 0))
-	      (+ (if multifile 1 0) 3)
+	      (+ 1 (if narrow 1 0))
+	      (+ 2 (if multifile 1 0))
+	      (+ (if multifile 1 0) 2)
 	      (1- pcol)))
 	    (setq recalc t))
 	   ((stringp formula)

regards,

Joost Helberg

-- 
Snow B.V.        http://snow.nl

             reply	other threads:[~2010-11-29 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 10:56 Joost Helberg [this message]
2010-12-03  8:52 ` error in calculating percentages in clocktables Carsten Dominik
2010-12-03 10:13   ` Joost Helberg
2010-12-03 10:37     ` Carsten Dominik

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

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

  git send-email \
    --in-reply-to=20101129.115616.179398633.joost@snow.nl \
    --to=joost@snow.nl \
    --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 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.