From: Bernt Hansen <bernt@norang.ca>
To: James Harkins <jamshark70@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Agenda TODO sorting by date
Date: Fri, 02 Mar 2012 21:48:42 -0500 [thread overview]
Message-ID: <87399qielx.fsf@norang.ca> (raw)
In-Reply-To: <87pqcu4duz.wl%jamshark70@dewdrop-world.net> (James Harkins's message of "Sat, 03 Mar 2012 10:28:36 +0800")
James Harkins <jamshark70@gmail.com> 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
next prev parent reply other threads:[~2012-03-03 2:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-03 2:28 Agenda TODO sorting by date James Harkins
2012-03-03 2:48 ` Bernt Hansen [this message]
2012-03-03 16:23 ` James Harkins
2012-03-03 16:38 ` Alan E. Davis
2012-03-04 1:23 ` James Harkins
2012-03-03 19:03 ` Bernt Hansen
2012-03-04 2:59 ` James Harkins
2012-03-04 4:31 ` Bernt Hansen
2012-03-04 6:59 ` James Harkins
-- strict thread matches above, loose matches on Subject: below --
2012-03-01 9:36 James Harkins
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=87399qielx.fsf@norang.ca \
--to=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
--cc=jamshark70@gmail.com \
/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).