emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Emin.shopper Martinian.shopper" <emin.shopper@gmail.com>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: How do you control sorting in org agenda?
Date: Mon, 17 May 2010 07:50:31 -0400	[thread overview]
Message-ID: <AANLkTikoBIsHX0r1ugoguN824NHlz49fquzvHbC0NzZW@mail.gmail.com> (raw)
In-Reply-To: <87sk5vecvz.fsf@gollum.intra.norang.ca>

On Thu, May 13, 2010 at 4:59 PM, Bernt Hansen <bernt@norang.ca> wrote:
> "Emin.shopper Martinian.shopper" <emin.shopper@gmail.com> writes:
>
>
> See the variable org-agenda-sorting-strategy.
>
> -Bernt


Thanks for the pointer. I put the following in my .emacs file and the
I change my prioritized items to things like TODO [#A]-01 foo, TODO
[#A]-02 bar, etc. and things sort as I wanted.


(defun org-cmp-title (a b)
  "Compare the titles of string A and B"
  (cond ((string-lessp a b) -1)
	((string-lessp b a) +1)
	(t nil)))

(setq org-agenda-cmp-user-defined 'org-cmp-title)

(setq org-agenda-sorting-strategy
      '((agenda habit-down time-up priority-down category-keep)
	(todo   priority-down user-defined-up category-keep)
	(tags   priority-down category-keep)
	(search category-keep)))

  reply	other threads:[~2010-05-17 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 20:47 How do you control sorting in org agenda? Emin.shopper Martinian.shopper
2010-05-13 20:59 ` Bernt Hansen
2010-05-17 11:50   ` Emin.shopper Martinian.shopper [this message]
2010-05-21 12:36     ` Emin.shopper Martinian.shopper

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=AANLkTikoBIsHX0r1ugoguN824NHlz49fquzvHbC0NzZW@mail.gmail.com \
    --to=emin.shopper@gmail.com \
    --cc=bernt@norang.ca \
    --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).