@@ -20,7 +20,7 @@ local function get_date(date, name)
20
20
error ((' Invalid format for "%s" date in Org Agenda' ):format (name ))
21
21
end
22
22
23
- local function get_opts (options )
23
+ local function get_shared_opts (options )
24
24
options = options or {}
25
25
local opts = {}
26
26
if options .filters and options .filters ~= ' ' then
@@ -35,6 +35,14 @@ local function get_opts(options)
35
35
return opts
36
36
end
37
37
38
+ local function get_tags_opts (options )
39
+ local opts = get_shared_opts (options )
40
+ opts .match_query = options .match_query
41
+ opts .todo_ignore_scheduled = options .org_agenda_todo_ignore_scheduled
42
+ opts .todo_ignore_deadlines = options .org_agenda_todo_ignore_deadlines
43
+ return opts
44
+ end
45
+
38
46
--- @class OrgApiAgendaOpts
39
47
--- @field filters ? OrgApiAgendaFilter
40
48
--- @field header ? string
51
59
--- @param options ? OrgApiAgendaOptions
52
60
function OrgAgenda .agenda (options )
53
61
options = options or {}
54
- local opts = get_opts (options )
62
+ local opts = get_shared_opts (options )
55
63
opts .from = get_date (options .from , ' from' )
56
64
opts .span = options .span
57
65
orgmode .agenda :agenda (opts )
62
70
--- @param options ? OrgApiAgendaTodosOptions
63
71
function OrgAgenda .todos (options )
64
72
options = options or {}
65
- local opts = get_opts (options )
73
+ local opts = get_shared_opts (options )
66
74
orgmode .agenda :todos (opts )
67
75
end
68
76
69
- --- @class OrgApiAgendaTagsOptions : OrgApiAgendaOpts
77
+ --- @class OrgApiAgendaTagsTodoOptions : OrgApiAgendaOpts
70
78
--- @field match_query ? string Match query to find the todos
71
- --- @field todo_only ? boolean
79
+ --- @field org_agenda_todo_ignore_scheduled ? OrgAgendaTodoIgnoreScheduledTypes
80
+ --- @field org_agenda_todo_ignore_deadlines ? OrgAgendaTodoIgnoreDeadlinesTypes
72
81
73
82
--- @param options ? OrgApiAgendaTagsOptions
74
- function OrgAgenda .tags (options )
83
+ function OrgAgenda .tags_todo (options )
75
84
options = options or {}
76
- local opts = get_opts (options )
77
- opts .todo_only = options .todo_only
78
- opts .match_query = options .match_query
79
- orgmode .agenda :tags (opts )
85
+ local opts = get_tags_opts (options )
86
+ orgmode .agenda :tags_todo (opts )
80
87
end
81
88
82
- --- @class OrgApiAgendaTagsTodoOptions : OrgApiAgendaOpts
83
- --- @field match_query ? string Match query to find the todos
89
+ --- @class OrgApiAgendaTagsOptions : OrgApiAgendaTagsTodoOptions
90
+ --- @field todo_only ? boolean
84
91
85
92
--- @param options ? OrgApiAgendaTagsOptions
86
- function OrgAgenda .tags_todo (options )
93
+ function OrgAgenda .tags (options )
87
94
options = options or {}
88
- local opts = get_opts (options )
89
- opts .match_query = options .match_query
90
- orgmode .agenda :tags_todo (opts )
95
+ local opts = get_tags_opts (options )
96
+ opts .todo_only = options .todo_only
97
+ orgmode .agenda :tags (opts )
91
98
end
92
99
93
100
return OrgAgenda
0 commit comments