emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Agenda TODO sorting by date


From: Bernt Hansen
Subject: Re: [O] Agenda TODO sorting by date
Date: Fri, 02 Mar 2012 21:48:42 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

James Harkins <address@hidden> writes:

> Given this:
>
> * Category 1
> ** TODO First todo in file <2012-03-30 Fri>                           :Tag:
> ** TODO Second todo in file <2012-03-29 Thu>                          :Tag:
> * Category 2
> ** TODO Third todo in file <2012-03-28 Wed>                           :Tag:
> ** TODO Fourth todo in file <2012-03-31 Sat>                          :Tag:
>
> I do C-c a < M Tag <ret> and get:
>
> Headlines with TAGS match: Tag
> Press `C-u r' to search again with new search string
>   todo_sort:  TODO First todo in file <2012-03-30 Fri>                     
> :Tag:
>   todo_sort:  TODO Second todo in file <2012-03-29 Thu>                    
> :Tag:
>   todo_sort:  TODO Third todo in file <2012-03-28 Wed>                     
> :Tag:
>   todo_sort:  TODO Fourth todo in file <2012-03-31 Sat>                    
> :Tag:
>
> I want to configure a custom agenda command so that I get:
>
> Headlines with TAGS match: Tag
> Press `C-u r' to search again with new search string
>   todo_sort:  TODO Third todo in file <2012-03-28 Wed>                     
> :Tag:
>   todo_sort:  TODO Second todo in file <2012-03-29 Thu>                    
> :Tag:
>   todo_sort:  TODO First todo in file <2012-03-30 Fri>                     
> :Tag:
>   todo_sort:  TODO Fourth todo in file <2012-03-31 Sat>                    
> :Tag:
>
> How do I do this?

You could write a custom sorting function that parses out the date from
the heading and compares them.  There may be a better way to do this
that I'm not aware of for this.

Set this function up in org-agenda-cmp-user-defined and
org-agenda-sorting-strategy to get the results you want.

HTH,
Bernt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]