org-agenda.el: Implement new effort filter
commitaa86e4bc9f7eab2b610460812af2cbc93ba2387e
authorBastien Guerry <bzg@altern.org>
Wed, 28 May 2014 10:26:54 +0000 (28 12:26 +0200)
committerBastien Guerry <bzg@altern.org>
Wed, 28 May 2014 10:26:54 +0000 (28 12:26 +0200)
treef33b421174bd047999770eee2d5b51893af69912
parent7dceecbb30b3c51e487cd6426db53a5c5a4e4694
org-agenda.el: Implement new effort filter

* org-agenda.el (org-agenda-custom-commands-local-options):
Add `org-agenda-effort-filter-preset'.
(org-agenda-filter-effort-default-operator): Delete.
(org-agenda-local-vars): Add `org-agenda-effort-filter'.
(org-agenda-mode-map): Use "_" to filter by effort.
(org-agenda-effort-filter, org-agenda-effort-filter-preset):
New variables.
(org-agenda-prepare-window, org-agenda-prepare)
(org-agenda-finalize, org-agenda-redo)
(org-agenda-filter-remove-all, org-agenda-filter-apply)
(org-agenda-set-mode-name, org-agenda-reapply-filters): Handle
effort filter.
(org-agenda-finalize-entries): Use
`org-sort-agenda-noeffort-is-high'.
(org-agenda-limit-entries): Get the property from the correct
location.
(org-agenda-limit-interactively): Throw a user error on wrong
input.
(org-agenda-filter-by-effort): New command.
(org-agenda-filter-by-tag): Don't filter by effort.
(org-agenda-filter-make-matcher): Handle effort filter.
(org-agenda-compare-effort): Don't handle the "?" operator.
(org-agenda-filter-show-all-effort): New command.

Note: This calls for some refactoring in the filter area.
lisp/org-agenda.el