From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Varesi Subject: Bug: Clocktable does not count columns for properties when using :formula % [8.3.3 (8.3.3-elpaplus @ /home/fvaresi/.emacs.d/elpa/org-plus-contrib-20160108/)] Date: Sat, 09 Jan 2016 05:52:07 -0300 Message-ID: <87vb73i18o.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHpFu-0003wm-AD for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 03:52:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHpFr-000278-2s for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 03:52:14 -0500 Received: from mail-vk0-x230.google.com ([2607:f8b0:400c:c05::230]:35327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHpFq-000273-U4 for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 03:52:10 -0500 Received: by mail-vk0-x230.google.com with SMTP id k1so203358066vkb.2 for ; Sat, 09 Jan 2016 00:52:10 -0800 (PST) Received: from localhost (r167-58-38-235.dialup.adsl.anteldata.net.uy. [167.58.38.235]) by smtp.gmail.com with ESMTPSA id c77sm14384237vkf.26.2016.01.09.00.52.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jan 2016 00:52:09 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi there! Let me first introduce a test case. Example content: === * DONE Task A :tag1: CLOCK: [2016-01-09 Sat 04:36]--[2016-01-09 Sat 05:20] => 0:44 * DONE Task B :tag2: CLOCK: [2016-01-09 Sat 05:20]--[2016-01-09 Sat 05:37] => 0:17 #+BEGIN: clocktable :maxlevel 2 :scope file :formula % :properties ("TAGS") #+END: === After running org-dblock-update, this was the result (note the % column): === #+BEGIN: clocktable :maxlevel 2 :scope file :formula % :properties ("TAGS") #+CAPTION: Clock summary at [2016-01-09 Sat 05:49] | TAGS | Headline | Time | % | |--------+--------------+--------+-----| | | *Total time* | *1:01* | 0.0 | |--------+--------------+--------+-----| | :tag1: | DONE Task A | 0:44 | 0.0 | | :tag2: | DONE Task B | 0:17 | 0.0 | #+TBLFM: $4='(org-clock-time% @2$2 $2..$3);%.1f #+END: === If I remove the :properties parameters the percentage values are correct. I fixed this locally by adding this line both when computing tcol and pcol around line 2648 of org-clock.el (if properties (length properties) 0) Best regards, Fernando.