6

I have 5 tasks from two org files - test and test2. I want to sort all tasks by only priority in the org agenda (To Do list, C-c a t). By default, I understand that they are ordered by (org-file name and within that descending order of priority). So I changed, (org-agenda-sortingstrategy to priority-desc). However, the ordering of tasks is somehow not happening by just priority-desc.

I am not even able to understand what is the logic being applied to sort this. Any help in this matter will be really helpful.

screenshot

adithyavr
  • 83
  • 4
  • Can we please tighten up the question to relate specifically to something like sorting todo by priority-down so there are a finite number of correct answers? As the question reads now (based on the first draft), it appears that you are seeking a tutorial on the one hand, with a semi-specific example on the other hand (which would have an answer). The latter will be more widely accepted by the community and have a strong likelihood of eliciting an answer within a short period of time. – lawlist Aug 24 '16 at 02:24
  • @lawlist. Thanks for the tip. I have updated to have orientation towards a specific problem I am trying to approach. – adithyavr Aug 24 '16 at 04:23

1 Answers1

5

Looks to me like that is ordering by just priority-desc.

I can infer from that snippet that you've set your org-default-priority to B, so the todo item with no explicit priority has defaulted to B and is correctly placed in the list.

If you want to send items without explicit priorities to the bottom of the list you have to set org-default-priority to the value of org-lowest-priority).

For example, add the following to .emacs:

(setq org-lowest-priority ?E)
(setq org-default-priority ?E)
Matt Innes
  • 250
  • 1
  • 7
  • Thanks @Matt ! That makes sense. Can you explain a little what '?E' means? And just to clarify tasks without priority = tasks set with default prioirity? – adithyavr Aug 26 '16 at 01:03
  • 1
    ?E is the desired lowest priority in this case, so you'd and up with valid priorities being A, B, C, D, E (the normal default was A-C so I was suggesting you create a new priority E they can default to so it won't clash with any existing priorities you might set). And yes, tasks without priority = tasks set with default prioirity. From http://orgmode.org/manual/Priorities.html : "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" – Matt Innes Aug 26 '16 at 08:17
  • Thanks! that really helps. I should go over the manual again!. No wonder, I missed that. – adithyavr Aug 26 '16 at 13:14