I would like to achieve two things:
1. Tag all tasks that are already marked DONE as ARCHIVE. I tried the following, but it messes up the file, creating multiple levels of archived items:
(defun my-org-archive-done-tasks ()
(interactive)
(org-map-entries 'org-archive-to-archive-sibling "/DONE"))
(global-set-key (kbd "C-c z") 'my-org-archive-done-tasks)
2. Have org-archive-to-archive-sibling be applied automatically when I mark a task DONE.
I searched for a while, but was not able to find a solution. Can these be done? Thanks!