org: Sorting agenda items

 
 10.4.3 Sorting agenda items
 ---------------------------
 
 Before being inserted into a view, the items are sorted.  How this is
 done depends on the type of view.
    • For the daily/weekly agenda, the items for each day are sorted.
      The default order is to first collect all items containing an
      explicit time-of-day specification.  These entries will be shown at
      the beginning of the list, as a _schedule_ for the day.  After
      that, items remain grouped in categories, in the sequence given by
      ‘org-agenda-files’.  Within each category, items are sorted by
      priority (SeePriorities), which is composed of the base
      priority (2000 for priority ‘A’, 1000 for ‘B’, and 0 for ‘C’), plus
      additional increments for overdue scheduled or deadline items.
    • For the TODO list, items remain in the order of categories, but
      within each category, sorting takes place according to priority
      (SeePriorities).  The priority used for sorting derives from
      the priority cookie, with additions depending on how close an item
      is to its due or scheduled date.
    • For tags matches, items are not sorted at all, but just appear in
      the sequence in which they are found in the agenda files.
 
    Sorting can be customized using the variable
 ‘org-agenda-sorting-strategy’, and may also include criteria based on
 the estimated effort of an entry (SeeEffort estimates).