I am trying to log all my todos in a
archive.org file, by means of the following function:
(defun mark-done-and-archive () (interactive) (org-todo 'done) (org-archive-subtree)) (define-key global-map "\C-c\C-x\C-s" 'mark-done-and-archive)
The part to move the todos to the archive works, but
(org-todo 'done) isn't working and in the archive the todo appears as TODO and not as DONE. If I try to eval
(org-todo 'done) in org-buffer with
M-: (org-todo 'done), it works so I don't know what's happening.