Skip to content

Commit bd81566

Browse files
authored
Enable archiving from agenda (#354)
1 parent ba28d8b commit bd81566

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

DOCS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,9 @@ Increase the priority of a headline item.
611611
#### **org_agenda_priority_down**
612612
*mapped to*: `-`<br />
613613
Decrease the priority of a headline item.
614+
#### **org_agenda_archive**
615+
mapped to: `<Leader>o$`<br />
616+
Archive headline item to archive location.
614617
#### **org_agenda_toggle_archive_tag**
615618
*mapped to*: `<Leader>oA`<br />
616619
Toggle "ARCHIVE" tag of a headline item.

lua/orgmode/agenda/init.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ function Agenda:priority_down()
303303
})
304304
end
305305

306+
function Agenda:archive()
307+
return self:_remote_edit({
308+
action = 'org_mappings.archive',
309+
redo = true,
310+
})
311+
end
312+
306313
function Agenda:toggle_archive_tag()
307314
return self:_remote_edit({
308315
action = 'org_mappings.toggle_archive_tag',

lua/orgmode/config/defaults.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ return {
7979
org_agenda_priority = '<prefix>,',
8080
org_agenda_priority_up = '+',
8181
org_agenda_priority_down = '-',
82+
org_agenda_archive = '<prefix>$',
8283
org_agenda_toggle_archive_tag = '<prefix>A',
8384
org_agenda_set_tags = '<prefix>t',
8485
org_agenda_deadline = '<prefix>id',

lua/orgmode/config/mappings/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ return {
3131
org_agenda_priority = m.action('agenda.set_priority', { opts = { desc = 'org set priority' } }),
3232
org_agenda_priority_up = m.action('agenda.priority_up', { opts = { desc = 'org increase priority' } }),
3333
org_agenda_priority_down = m.action('agenda.priority_down', { opts = { desc = 'org decrease priority' } }),
34+
org_agenda_archive = m.action('agenda.archive', { opts = { desc = 'org archive subtree' } }),
3435
org_agenda_toggle_archive_tag = m.action(
3536
'agenda.toggle_archive_tag',
3637
{ opts = { desc = 'org toggle archive tag' } }

0 commit comments

Comments
 (0)