Skip to content

Commit 54c6cc2

Browse files
committed
Injects DEADLINE, SCHEDULED, and CLOSED as Searchable props
1 parent 74e4294 commit 54c6cc2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/orgmode/parser/file.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,17 @@ function File:apply_search(search, todo_only)
205205
if item:is_archived() or (todo_only and not item:is_todo()) then
206206
return false
207207
end
208+
209+
local deadline = item:get_deadline_date()
210+
local scheduled = item:get_scheduled_date()
211+
local closed = item:get_closed_date()
212+
208213
return search:check({
209214
props = vim.tbl_extend('keep', {}, item.properties.items, {
210215
category = item.category,
216+
deadline = deadline and deadline:to_wrapped_string(true),
217+
scheduled = scheduled and scheduled:to_wrapped_string(true),
218+
closed = closed and closed:to_wrapped_string(false),
211219
}),
212220
tags = item.tags,
213221
todo = item.todo_keyword.value,

0 commit comments

Comments
 (0)