From: Fernando Varesi <fvaresi@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-clock.el: Fix column count for :formula %
Date: Mon, 11 Jan 2016 13:56:27 -0300 [thread overview]
Message-ID: <87y4bwm4w4.fsf@gmail.com> (raw)
* 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
next reply other threads:[~2016-01-11 16:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 16:56 Fernando Varesi [this message]
2016-01-11 23:31 ` [PATCH] org-clock.el: Fix column count for :formula % Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4bwm4w4.fsf@gmail.com \
--to=fvaresi@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).