From 93fe1072f636e6b1b790e04a150522cea907a695 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Mon, 11 Jan 2016 22:54:09 +0100 Subject: [PATCH 1/2] org-agenda: Fix filter for org-habits in agenda * lisp/org-agenda.el (org-agenda-filter-apply): Get text at bol instead of eol. Note that eol can be overwritten by org-habits. --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 59d0994b8..48d38049c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7705,7 +7705,7 @@ tags in the FILTER if any of the tags in FILTER are grouptags." (progn (setq tags (org-get-at-bol 'tags) cat (org-get-at-eol 'org-category 1) - txt (org-get-at-eol 'txt 1)) + txt (org-get-at-bol 'txt)) (if (not (eval org-agenda-filter-form)) (org-agenda-filter-hide-line type)) (beginning-of-line 2)) From 47c92146a9694bc187f4caae02e7bd658ce8aebf Mon Sep 17 00:00:00 2001 From: Fernando Varesi Date: Mon, 11 Jan 2016 13:56:27 -0300 Subject: [PATCH 2/2] 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. --- lisp/org-clock.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index e6ca46666..8e1fca0b5 100644 --- a/lisp/org-clock.el +++ b/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)))