Archive all past calendar items in Org mode?

I become dependent on Org mode, especially in how calendar items (aka timestamped items) and TODO are equal class citizens in the project tree. Over time, many of these calendar items slip into the past.

I would like a single keybind that would automatically archive any timestamped / calendar item (nb: not a scheduled item or object with a zero value, and preferably only those things that don't have TODO types) that have already happened.

Is there something similar in Org mode? Can someone tell me how to write something like org-archive-past-items-in-buffer ? (My elisp skills are weak.) Thank you!

(EDIT: I should note that I mean the archive in the sense of Cc $ archive files, not the archive in the sense of Cc Cx a or Cc Cx a archive tags / siblings.)

+6
source share
1 answer

I would create a new user record as the following:

 (setq org-agenda-custom-commands '(("P" ((tags "TIMESTAMP<=\"<now>\""))))) 

Then Cc a P%. RET $ will archive all items in the resulting view of the agenda (it is assumed that Cc a is bound to `org-Agenda '.)

Associated and complementary, Cc / b RET will create a rare tree with planned and extreme elements until today (or the date you interactively enter.) Then you can navigate through the buffer using Cc Cn (or just n at the beginning of the line `org- use-speek-commands' is not a nickname) and archive entries.

+6
source

Source: https://habr.com/ru/post/914594/


All Articles