org-agenda.el: New options to limit the number of displayed entries
commit33c4f6233d25821079282852de65ff6f2b53a9d4
authorBastien Guerry <bzg@altern.org>
Wed, 6 Feb 2013 16:16:35 +0000 (6 17:16 +0100)
committerBastien Guerry <bzg@altern.org>
Wed, 6 Feb 2013 16:23:25 +0000 (6 17:23 +0100)
tree201f6d753e1f0174084aacb243ac2a114ad737b2
parentc5ac9d415e57bb98abf74c58befa88e0153dabf8
org-agenda.el: New options to limit the number of displayed entries

* org-agenda.el (org-agenda-max-entries)
(org-agenda-max-todos, org-agenda-max-tags)
(org-agenda-max-effort): New options.
(org-timeline, org-agenda-list, org-search-view)
(org-todo-list, org-tags-view): Tell
`org-agenda-finalize-entries' what agenda type we are
currently finalizing for.
(org-agenda-finalize-entries): Limit the number of entries
depending on the new options.
(org-agenda-limit-entries): New function.

Thanks to the various people who asked for this feature
or for a variation of it.

You can set the new options to an integer or to an alist.

(setq org-agenda-max-effort 120)
  => Don't display entries beyond 120 minutes of effort

(setq org-agenda-max-effort '((todo . 60) (agenda . 240)))
  => Limit to 60 minutes in TODO agenda and to 240 in
     "agenda" agenda views.
lisp/org-agenda.el