Browse Source

org-clock.el: Fix column count for :formula %

* 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.
Fernando Varesi 9 years ago
parent
commit
47c92146a9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lisp/org-clock.el

+ 2 - 0
lisp/org-clock.el

@@ -2646,12 +2646,14 @@ from the dynamic block definition."
 	 ((eq formula '%)
 	  ;; compute the column where the % numbers need to go
 	  (setq pcol (+ 2
+			(length properties)
 			(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
+			(length properties)
 			(if multifile 1 0)
 			(if level-p 1 0)
 			(if timestamp 1 0)))