Skip to content

Commit 08873bf

Browse files
authored
feat(search): add ability to search on LEVEL (#959)
Emacs org-mode allows for matching based on a variable LEVEL which represents the level of the headline. This change enables this feature. See https://orgmode.org/manual/Matching-tags-and-properties.html
1 parent 6a9e34e commit 08873bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/orgmode/files/file.lua

+2
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ function OrgFile:apply_search(search, todo_only)
315315
local closed = item:get_closed_date()
316316
local properties = item:get_own_properties()
317317
local priority = item:get_priority()
318+
local level = item:get_level()
318319

319320
return search:check({
320321
props = vim.tbl_extend('keep', {}, properties, {
@@ -324,6 +325,7 @@ function OrgFile:apply_search(search, todo_only)
324325
closed = closed and closed:to_wrapped_string(false),
325326
priority = priority,
326327
todo = item:get_todo() or '',
328+
level = level,
327329
}),
328330
tags = item:get_tags(),
329331
todo = item:get_todo() or '',

0 commit comments

Comments
 (0)