From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: bug? agenda sorting with user-defined-up does not sort Date: Wed, 24 Jun 2009 13:49:37 -0700 Message-ID: <20524da70906241349s2acbb582rcc9c3c4252637cad@mail.gmail.com> References: <20524da70906241345n40f8350ci70ae23467facb32e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJZPw-0006QT-Ox for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:50:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJZPr-0006HM-36 for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:50:03 -0400 Received: from [199.232.76.173] (port=51370 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJZPq-0006H7-VW for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:49:59 -0400 Received: from mail-px0-f176.google.com ([209.85.216.176]:62900) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJZPp-0007GQ-U1 for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 16:49:58 -0400 Received: by pxi6 with SMTP id 6so901443pxi.14 for ; Wed, 24 Jun 2009 13:49:57 -0700 (PDT) In-Reply-To: <20524da70906241345n40f8350ci70ae23467facb32e@mail.gmail.com> 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 Never mind. In my attempts to debug I loaded some settings again, overwriting this line: (setf org-agenda-sorting-strategy '(user-defined-up)) So there might be no bug after all. Sorry for the noise. On Wed, Jun 24, 2009 at 13:45, Samuel Wales wrote: > Org agenda user-defined sorting does not seem to work. =A0Does > anybody else use it? > > The following is a complete test case. =A0I cannot proceed > further. =A0I 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) > =A0(let ((aa (test a)) > =A0 =A0 =A0 =A0(bb (test b))) > =A0 =A0(cond > =A0 =A0 =A0((> aa bb) 1) > =A0 =A0 =A0((< aa bb) -1)))) > (defun test (s) > =A0(let ((x (and (string-match "value \\([-0-9]+\\)" s) > =A0 =A0 =A0 =A0 =A0 =A0(match-string 1 s)))) > =A0 =A0(if x > =A0 =A0 =A0 =A0(progn > =A0 =A0 =A0 =A0 =A0(message "match %s" x) > =A0 =A0 =A0 =A0 =A0(string-to-number x)) > =A0 =A0 =A0(progn > =A0 =A0 =A0 =A0(message "not match %s" s) > =A0 =A0 =A0 =A00)))) > *** 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)WHE= N > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(6)TODO (7)STUCK (8)NEXT (9)DA= TA (10)REPURPOSE (11)WAIT > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(12)SOME (13)SUGU (14)MAYBE (1= 5)BEKI (16)DOUBTFUL > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(17)CONVERSATION (18)MOST (19)= DONEKA (20)DONE > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(21)DUPLICATE (22)MOOT (23)WAK= ARANAI > =A0sort: =A0 =A0 =A0 NEXT value 2 > =A0sort: =A0 =A0 =A0 NEXT value -4 > =A0sort: =A0 =A0 =A0 NEXT value 1 > =A0sort: =A0 =A0 =A0 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. =A0Conflicts of interest are destroying research. =A0/You/= can > get the disease at any time permanently. =A0Do science and justice matter= to > you? =A0http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm > --=20 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