emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-clock.el: Fix column count for :formula %
@ 2016-01-11 16:56 Fernando Varesi
  2016-01-11 23:31 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Fernando Varesi @ 2016-01-11 16:56 UTC (permalink / raw)
  To: emacs-orgmode


* 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] org-clock.el: Fix column count for :formula %
  2016-01-11 16:56 [PATCH] org-clock.el: Fix column count for :formula % Fernando Varesi
@ 2016-01-11 23:31 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-01-11 23:31 UTC (permalink / raw)
  To: Fernando Varesi; +Cc: emacs-orgmode

Hello,

Fernando Varesi <fvaresi@gmail.com> writes:

> * 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.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-11 23:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11 16:56 [PATCH] org-clock.el: Fix column count for :formula % Fernando Varesi
2016-01-11 23:31 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).