From 2f16d473332456593a0144b81cc91cc3b2de4ddc Mon Sep 17 00:00:00 2001 From: Karolis Pabijanskas Date: Tue, 17 Dec 2024 06:25:26 +0200 Subject: [PATCH] fix(tags); retain direct tags even if they are excluded from inheritance If a tag is excluded from inheritance, then it gets excluded even from headlines that have it assigned directly. This is most noticable when searching in agenda view. This PR fixes it - you can now search by tags that are excluded from inheritance. Fixes #830 --- lua/orgmode/files/headline.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/orgmode/files/headline.lua b/lua/orgmode/files/headline.lua index b6c1d9c6..c008dd2a 100644 --- a/lua/orgmode/files/headline.lua +++ b/lua/orgmode/files/headline.lua @@ -556,9 +556,10 @@ function Headline:get_tags() local all_tags = utils.concat({}, file_tags) utils.concat(all_tags, utils.reverse(parent_tags), true) + all_tags = config:exclude_tags(all_tags) utils.concat(all_tags, tags, true) - return config:exclude_tags(all_tags), own_tags_node + return all_tags, own_tags_node end ---@return OrgHeadline | nil