                       (org-tags-match-list-sublevels t)
                       (org-agenda-sorting-strategy
                        '(todo-state-down effort-up priority-down category-keep))))
+          (todo "WAITING"
+                ((org-agenda-overriding-header "Waiting tasks")
+                 (org-tags-match-list-sublevels t)
+                 (org-agenda-sorting-strategy
+                  '(todo-state-down priority-down category-keep))))
+          (tags "+LEVEL=1-TODO=\"CANCELED\""
+                ((org-agenda-overriding-header "Stuck projects")
+                 (org-agenda-files '("~/Dropbox/org/projects.org"))
+                 (org-agenda-skip-function 'bh/skip-non-stuck-projects)
+                 (org-agenda-sorting-strategy
+                  '(category-keep))))
+          (tags "+LEVEL=1"
+                ((org-agenda-overriding-header "All other projects")
+                 (org-agenda-files '("~/Dropbox/org/projects.org"))
+                 (org-agenda-skip-function 'bh/skip-stuck-projects)
+                 (org-agenda-sorting-strategy
+                  '(category-keep))))
           ))))
 
 

                            ("roscoe" . ?r)
                            ("shop" . ?s))))

(setq org-agenda-custom-commands
      '(("c" "Custom agenda view"
         ((agenda "" nil)

(defvar date_added "\n  :PROPERTIES:\n  :DATE_ADDED: %U\n  :END:\n")

(setq org-capture-templates
      `((" " "simple entry" entry (file "~/Dropbox/Org/refile.org")
         "* %?")
        ("p" "new project" entry (file "~/Dropbox/Org/projects.org")
         "* %? %^g")
        ("t" "todo" entry (file "~/Dropbox/Org/refile.org")
         ,(concat "* TODO %?" date_added))
        ("n" "note" entry (file "~/Dropbox/Org/refile.org")
         ,(concat "* %? :note:" date_added))
