From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: error in calculating percentages in clocktables Date: Fri, 3 Dec 2010 11:37:41 +0100 Message-ID: <9352B2C9-BC12-4163-B22D-0C7AFB6672E2@gmail.com> References: <20101129.115616.179398633.joost@snow.nl> <3F1F7C35-B348-4A8A-9F1E-91E7D78B5092@gmail.com> <20101203.111328.221844449.joost@snow.nl> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=59286 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POT1O-0001Dj-Vk for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 05:37:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POT1N-0000d7-9G for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 05:37:46 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:56525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POT1N-0000cd-2S for emacs-orgmode@gnu.org; Fri, 03 Dec 2010 05:37:45 -0500 Received: by eydd26 with SMTP id d26so18623453eyd.0 for ; Fri, 03 Dec 2010 02:37:44 -0800 (PST) In-Reply-To: <20101203.111328.221844449.joost@snow.nl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Joost Helberg Cc: emacs-orgmode@gnu.org Hi Joost, thanks for your fast reaction and the testing. - Carsten On Dec 3, 2010, at 11:13 AM, Joost Helberg wrote: > Carsten, > > your more general approach works fine for me. The pushed fix seems > allright. > > many regards, > > Joost > >>>>>> "Carsten" == Carsten Dominik writes: >> Subject: Re: [Orgmode] error in calculating percentages in >> clocktables >> From: Carsten Dominik >> To: Joost Helberg >> Cc: emacs-orgmode@gnu.org >> Date: Fri, 3 Dec 2010 09:52:57 +0100 > >> Hi Joost, > >> thanks for this, but the new tables are complex and the patch was not >> general enough. I have just pushed a fix which I think is correct. >> Please verify. > >> - Carsten > >> On Nov 29, 2010, at 11:56 AM, Joost Helberg wrote: > >>> 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 >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > >> - Carsten > > > > > -- > Snow B.V. http://snow.nl - Carsten