Skip to content

Commit

Permalink
fix: retain direct tags even if they are excluded from inheritance (#839
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
kpabijanskas authored Dec 17, 2024
1 parent f8c0fd3 commit 92e8b51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/orgmode/files/headline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 92e8b51

Please sign in to comment.