Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (36 sloc) 1.89 KB

Examples

Custom sidebar command

It’s easy to define a custom sidebar command. Here’s an example that shows items in org-agenda-files that are not done and either have a deadline on or before today, or are scheduled for today. It defines a command named my-sidebar. The query ((and ...) uses org-ql to select items.

(org-sidebar-defsidebar my-sidebar
  :header "My Sidebar"
  :sidebars ((and (not (done))
                  (or (deadline <=)
                      (date = today)))))

Grouping with org-super-agenda

org-sidebar also integrates with org-super-agenda. This command is like the previous one, but it groups items with org-super-agenda into several groups.

(org-sidebar-defsidebar today-sidebar
  :header "Today"
  :sidebars (((and (not (done))
                   (or (deadline <=)
                       (scheduled <=)
                       (date = today)))))
  :super-groups '((:time-grid t)
                  (:name "Overdue" :scheduled past :deadline past)
                  (:name "Due today" :scheduled today :deadline today)
                  (:tag "bills")
                  (:priority "A")
                  (:name "Non-tasks"
                         :todo nil)))

This shows a sidebar like this:

images/custom-command.png