emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: bug? agenda sorting with user-defined-up does not sort
Date: Wed, 24 Jun 2009 13:49:37 -0700	[thread overview]
Message-ID: <20524da70906241349s2acbb582rcc9c3c4252637cad@mail.gmail.com> (raw)
In-Reply-To: <20524da70906241345n40f8350ci70ae23467facb32e@mail.gmail.com>

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

      reply	other threads:[~2009-06-24 20:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24 20:45 bug? agenda sorting with user-defined-up does not sort Samuel Wales
2009-06-24 20:49 ` Samuel Wales [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20524da70906241349s2acbb582rcc9c3c4252637cad@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).