From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Emin.shopper Martinian.shopper" Subject: Re: How do you control sorting in org agenda? Date: Mon, 17 May 2010 07:50:31 -0400 Message-ID: References: <87sk5vecvz.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=37594 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODyqC-00058H-GL for emacs-orgmode@gnu.org; Mon, 17 May 2010 07:50:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODyqA-0003Tq-I0 for emacs-orgmode@gnu.org; Mon, 17 May 2010 07:50:36 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:41635) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODyqA-0003TZ-Df for emacs-orgmode@gnu.org; Mon, 17 May 2010 07:50:34 -0400 Received: by iwn8 with SMTP id 8so349945iwn.0 for ; Mon, 17 May 2010 04:50:32 -0700 (PDT) In-Reply-To: <87sk5vecvz.fsf@gollum.intra.norang.ca> 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: Bernt Hansen Cc: emacs-orgmode@gnu.org On Thu, May 13, 2010 at 4:59 PM, Bernt Hansen wrote: > "Emin.shopper Martinian.shopper" 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)))