Org agenda user-defined sorting does not seem to work. Does anybody else use it?
The following is a complete test case. I cannot proceed further. I cannot find any user error here, but that does not mean that there is none. Thanks. * how to reproduce *** save this to sort.org *** eval this code with cl required (setf org-agenda-cmp-user-defined 'alpha-org-agenda-cmp) (defun alpha-org-agenda-cmp (a b) (let ((aa (test a)) (bb (test b))) (cond ((> aa bb) 1) ((< aa bb) -1)))) (defun test (s) (let ((x (and (string-match "value \\([-0-9]+\\)" s) (match-string 1 s)))) (if x (progn (message "match %s" x) (string-to-number x)) (progn (message "not match %s" s) 0)))) *** run M-x org-agenda < t on this buf *** result: this should be sorted but it is not Global list of TODO items of type: ALL Available with `N r': (0)ALL (1)REF (2)CHUU (3)ONGOING (4)WHENEVER (5)WHEN (6)TODO (7)STUCK (8)NEXT (9)DATA (10)REPURPOSE (11)WAIT (12)SOME (13)SUGU (14)MAYBE (15)BEKI (16)DOUBTFUL (17)CONVERSATION (18)MOST (19)DONEKA (20)DONE (21)DUPLICATE (22)MOOT (23)WAKARANAI sort: NEXT value 2 sort: NEXT value -4 sort: NEXT value 1 sort: NEXT value 1 * NEXT value 2 * NEXT value -4 * NEXT value 1 * NEXT value 1 -- Myalgic encephalomyelitis denialism is causing death and severe suffering, worse than MS. Conflicts of interest are destroying research. /You/ can get the disease at any time permanently. Do science and justice matter to you? http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode