5

Suppose I have an archive/ folder, which contains several .org_archive files, each for a specific month.

When I archive a task in org-mode, is there a way to make it so that the task is automatically archived to the appropriate archive file, based on the current month?

For example, if I complete a task on 07/31/2016, archiving the task should move it to archive/archive-201607.org_archive. The next day, on 08/01/2016, archiving another task should move it to archive/archive-201608.org_archive. If the appropriate file for the month doesn't exist, org-mode should create one.

3

Try setting org-archive-location as:

(setq org-archive-location (concat "archive/archive-"
                                   (format-time-string "%Y%m" (current-time))
                                   ".org_archive::"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.