From 32cf9d9986146ca3f56493672d12b21cb0e53d44 Mon Sep 17 00:00:00 2001 From: "Kevin J. Foley" Date: Thu, 23 Apr 2020 20:27:54 -0400 Subject: [PATCH] Remove tags matching `org-agenda-hide-tags' when building agendas --- org-ql-view.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/org-ql-view.el b/org-ql-view.el index 7739ea7..d40e976 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -685,11 +685,16 @@ return an empty string." (warn "No marker found for item: %s" title) (org-element-property :tags element)) (org-element-property :tags element))) - (tag-string (when tag-list - (--> tag-list - (s-join ":" it) - (s-wrap it ":") - (org-add-props it nil 'face 'org-tag)))) + (tag-string (when-let + ((tag-list (if (not org-agenda-hide-tags-regexp) + tag-list + (cl-remove-if + (lambda (tag) (string-match-p org-agenda-hide-tags-regexp tag)) + tag-list)))) + (--> tag-list + (s-join ":" it) + (s-wrap it ":") + (org-add-props it nil 'face 'org-tag)))) ;; (category (org-element-property :category element)) (priority-string (-some->> (org-element-property :priority element) (char-to-string)