* bug? agenda sorting with user-defined-up does not sort
@ 2009-06-24 20:45 Samuel Wales
2009-06-24 20:49 ` Samuel Wales
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Wales @ 2009-06-24 20:45 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bug? agenda sorting with user-defined-up does not sort
2009-06-24 20:45 bug? agenda sorting with user-defined-up does not sort Samuel Wales
@ 2009-06-24 20:49 ` Samuel Wales
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Wales @ 2009-06-24 20:49 UTC (permalink / raw)
To: emacs-orgmode
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<samologist@gmail.com> wrote:
> 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
>
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-24 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24 20:45 bug? agenda sorting with user-defined-up does not sort Samuel Wales
2009-06-24 20:49 ` Samuel Wales
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.