summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Wahl <marcowahlsoft@gmail.com>2019-01-13 15:09:04 +0100
committerMarco Wahl <marcowahlsoft@gmail.com>2019-01-13 15:09:04 +0100
commit295d149f46303ec7dcf39dc29ca12b8ae0874f9c (patch)
tree5b983cbe72bc89ef551528496650eaae983f6beb
parentf3584ecc3b437a53da4ecfe5c7e04a4d8f659ad5 (diff)
downloadorg-mode-295d149f46303ec7dcf39dc29ca12b8ae0874f9c.tar.gz
agenda: Fix get category for habit lines
* lisp/org-agenda.el (org-agenda-get-category): New function to wrap the identification of the category of an agenda line.
-rw-r--r--lisp/org-agenda.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9607b12..b25a8e9 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7380,6 +7380,10 @@ With a prefix argument, do so in all agenda buffers."
(defvar org-agenda-filter-form nil)
(defvar org-agenda-filtered-by-category nil)
+(defsubst org-agenda-get-category ()
+ "Return the category of the agenda line."
+ (org-get-at-bol 'org-category))
+
(defun org-agenda-filter-by-category (strip)
"Filter lines in the agenda buffer that have a specific category.
The category is that of the current line.
@@ -7390,7 +7394,7 @@ With a prefix argument, exclude the lines of that category.
(if (and org-agenda-filtered-by-category
org-agenda-category-filter)
(org-agenda-filter-show-all-cat)
- (let ((cat (org-no-properties (org-get-at-eol 'org-category 1))))
+ (let ((cat (org-no-properties (org-agenda-get-category))))
(cond
((and cat strip)
(org-agenda-filter-apply
@@ -7725,7 +7729,7 @@ tags in the FILTER if any of the tags in FILTER are grouptags."
(if (org-get-at-bol 'org-marker)
(progn
(setq tags (org-get-at-bol 'tags)
- cat (org-get-at-eol 'org-category 1)
+ cat (org-agenda-get-category)
txt (org-get-at-bol 'txt))
(unless (eval org-agenda-filter-form)
(org-agenda-filter-hide-line type))
@@ -8950,7 +8954,7 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
(equal m hdmarker))
(setq props (text-properties-at (point))
dotime (org-get-at-bol 'dotime)
- cat (org-get-at-eol 'org-category 1)
+ cat (org-agenda-get-category)
level (org-get-at-bol 'level)
tags thetags
new