From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Varesi Subject: [PATCH] org-clock.el: Fix column count for :formula % Date: Mon, 11 Jan 2016 13:56:27 -0300 Message-ID: <87y4bwm4w4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIflk-00067c-N2 for emacs-orgmode@gnu.org; Mon, 11 Jan 2016 11:56:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIflh-0004fu-H5 for emacs-orgmode@gnu.org; Mon, 11 Jan 2016 11:56:36 -0500 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]:34241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIflh-0004fo-Bd for emacs-orgmode@gnu.org; Mon, 11 Jan 2016 11:56:33 -0500 Received: by mail-pf0-x22b.google.com with SMTP id q63so48717848pfb.1 for ; Mon, 11 Jan 2016 08:56:33 -0800 (PST) Received: from localhost (r167-58-44-22.dialup.adsl.anteldata.net.uy. [167.58.44.22]) by smtp.gmail.com with ESMTPSA id y18sm24508500pfi.84.2016.01.11.08.56.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2016 08:56:31 -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 * lisp/org-clock.el (org-clocktable-write-default): Count properties columns when using special :formula % The previous count did not consider properties columns, so the generated formula was incorrect. --- lisp/org-clock.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 5976872..dfc7d4c 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2627,12 +2627,14 @@ from the dynamic block definition." ((eq formula '%) ;; compute the column where the % numbers need to go (setq pcol (+ 2 + (if properties (length properties) 0) (if multifile 1 0) (if level-p 1 0) (if timestamp 1 0) (min maxlevel (or ntcol 100)))) ;; compute the column where the total time is (setq tcol (+ 2 + (if properties (length properties) 0) (if multifile 1 0) (if level-p 1 0) (if timestamp 1 0))) -- 2.6.4