From bf14afdf4d6942b72a5659b7b73852649c9aebe9 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Fri, 30 Aug 2019 15:40:23 -0500 Subject: [PATCH] Add: (org-ql-views) Agenda-like and Review views --- org-ql-agenda.el | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/org-ql-agenda.el b/org-ql-agenda.el index b2acd20..223cfeb 100644 --- a/org-ql-agenda.el +++ b/org-ql-agenda.el @@ -80,7 +80,27 @@ Based on `org-agenda-mode-map'.") ;;;; Customization (defcustom org-ql-views - (list (cons "Recent entries" #'org-ql-view-recent-items) + (list (cons "Agenda-like" (lambda () + (interactive) + (org-ql-search (org-agenda-files) + '(and (not (done)) + (or (habit) + (deadline auto) + (scheduled :to today) + (ts-active :on today))) + :sort '(date priority todo) + :groups (when (boundp org-super-agenda-groups) + org-super-agenda-groups)))) + (cons "Recent entries" #'org-ql-view-recent-items) + (cons "Review (to-do keyword without timestamp in past 2 weeks)" + (lambda () + (interactive) + (org-ql-search (org-agenda-files) + '(and (todo) + (not (ts :from -14))) + :title "Review" + :sort '(date priority todo) + :groups '((:auto-parent t))))) (cons "Stuck Projects" (lambda () (interactive) (org-ql-search (org-agenda-files)