From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: bug? agenda sorting with user-defined-up does not sort Date: Wed, 24 Jun 2009 13:45:38 -0700 Message-ID: <20524da70906241345n40f8350ci70ae23467facb32e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJZM5-0002k5-Tw for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:46:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJZM1-0002gg-8D for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:46:05 -0400 Received: from [199.232.76.173] (port=37329 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJZM1-0002gd-24 for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:46:01 -0400 Received: from mail-px0-f176.google.com ([209.85.216.176]:53429) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJZM0-0006gU-IG for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:46:00 -0400 Received: by pxi6 with SMTP id 6so899960pxi.14 for ; Wed, 24 Jun 2009 13:45:58 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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