I'm trying to build custom agenda block which would sort completed tasks by CLOSED property.
org-agenda-sorting-strategy only supports ordering by SCHEDULED and DEADLINE properties, so I guess only way to implement this is to use custom sorting function with
org-agenda-cmp-user-defined. Any help would be greatly appreciated.
;; custom sorting for closed items (does not work) (defun my/org-custom-cmp (a b) (org-cmp-ts a b "closed") ) (setq org-agenda-cmp-user-defined 'my/org-custom-cmp) (setq org-agenda-custom-commands '(("z" "Tasks Overview" ((tags "+TODO=\"DONE\"+CLOSED>\"<-3d>\"" ((org-agenda-cmp-user-defined 'my/org-custom-cmp) (org-agenda-sorting-strategy '(user-defined-up)) (org-agenda-max-entries 15) (org-agenda-overriding-header "Recently Completed Tasks"))) )) ;; ...