[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Sort order of TODO entries
From: |
Matt Lundin |
Subject: |
Re: [O] Sort order of TODO entries |
Date: |
Thu, 08 Mar 2012 09:52:40 -0600 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux) |
Hi Detlef,
Detlef Steuer <address@hidden> writes:
> I don't understand the reasoning in putting TODOs without priority or
> WAITING without priority before priority #C.
>
> Conceptually "no priority" (for me) means "not decided how important or
> not important at all, but would like to work on it", In contrast "#C"
> means "must be done, but do #A and #B first".
>
> It would IMHO feel much more natural to sort
>
> #A, #B, #C, no priority.
Currently, org gives items with no priority a default priority of B.
,----[ (info "(org) Priorities")
| By default, Org mode supports three priorities: `A', `B', and `C'. `A'
| is the highest priority. An entry without a cookie is treated just
| like priority `B'. Priorities make a difference only for sorting in
| the agenda (*note Weekly/daily agenda::); outside the agenda, they have
| no inherent meaning to Org mode.
`----
> Is that (easily) possible?
You can modify how the agenda sorts priorities with a custom function.
Here's a quick hack that seems to work:
(defun my-org-get-priority ()
(save-match-data
(if (not (string-match org-priority-regexp s))
-1000
(* 1000 (- org-lowest-priority
(string-to-char (match-string 2 s)))))))
(setq org-get-priority-function 'my-org-get-priority)
Best,
Matt