org.el: Implement agenda sorting against stats cookies. Code cleanup
commit45c4f276f266fc41530128e1069979eb8df50fa2
authorBastien Guerry <bzg@altern.org>
Fri, 23 May 2014 13:54:50 +0000 (23 15:54 +0200)
committerBastien Guerry <bzg@altern.org>
Fri, 23 May 2014 13:54:50 +0000 (23 15:54 +0200)
tree1d23f63e1f69c0a5049e39b6d3d845617087d502
parentd6775b8751e26da195c4d91abc8d8b558d98c59d
org.el: Implement agenda sorting against stats cookies.  Code cleanup

* org.el (org-refresh-category-properties): Don't put the
'org-category-position property.
(org-refresh-stats-properties): New function.
(org-agenda-ignore-properties): Rename from
`org-agenda-ignore-drawer-properties', which is now obsolete.
Allow to use 'stats.
(org-agenda-prepare-buffers): Check stats properties.
(org-get-at-bol): Make a defsubst.
(org-get-at-eol): New function.

* org-agenda.el (org-entries-lessp): Sort by statistic
cookies.
(org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks): Don't set
the 'org-category and 'org-category-pos text properties.
'org-category-pos is useless and 'org-category is set through
`org-agenda-format-item'.
(org-agenda-format-item): Remove useless code.
(org-cmp-priority): Delete.
(org-cmp-values): New function to compare text properties
values.
(org-cmp-effort, org-agenda-to-appt): Check against the end of
the line.
(org-agenda-filter-by-category, org-agenda-filter-apply)
(org-agenda-change-all-lines): Use `org-get-at-eol'.
lisp/org-agenda.el
lisp/org.el