My Custom Org Agenda

By setting the org-agenda-custom-commands variable, we can define our own agenda views that only include necessary information.

For example, a daily agenda view with four blocks:

  1. Important tasks with highest priority.
  2. Today’s tasks.
  3. Next three day’s tasks, exclude the finished tasks.
  4. Upcoming fourteen day’s tasks, exclude the finished tasks.
(setq org-agenda-custom-commands
      '(("d" "Daily Agenda"
         ((tags-todo "+PRIORITY=\"A\""
                     ((org-agenda-overriding-header "Important tasks")))
          (agenda "" ((org-agenda-overriding-header "Today")
                      (org-agenda-span 1)
                      (org-deadline-warning-days 0)
                      (org-scheduled-past-days 0)))
          (agenda "" ((org-agenda-overriding-header "Next 3 days")
                      (org-agenda-start-on-weekday nil)
                      (org-agenda-start-day "+1d")
                      (org-agenda-span 3)
                      (org-deadline-warning-days 0)
                      (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))))
          (agenda "" ((org-agenda-overriding-header "Upcoming 14 days")
                      (org-agenda-time-grid nil)
                      (org-agenda-start-on-weekday nil)
                      (org-agenda-start-day "+4d")
                      (org-agenda-span 14)
                      (org-agenda-show-all-dates nil)
                      (org-deadline-warning-days 0)
                      (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))))))))

Related

Better capture template for blog post

An org capture template to create post file in blog directory, and insert some front matters.

Emacs中记笔记

Denote is a simple note-taking tool for Emacs.

Org Mode Archiving

Archiving in agenda view.