From 6beada491263c196410226500f4ebd6fbc2a6b07 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 22 Jan 2020 17:02:44 -0600 Subject: [PATCH] Change: (org-ql-views) Mouseover text, view names --- README.org | 4 ++ org-ql-view.el | 127 +++++++++++++++++++++++++++---------------------- org-ql.info | 30 +++++++----- 3 files changed, 93 insertions(+), 68 deletions(-) diff --git a/README.org b/README.org index 958ec15..a201ab7 100644 --- a/README.org +++ b/README.org @@ -400,6 +400,10 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience + Display a message when views are refreshed. (Thanks to [[https://github.com/xeijin][xeijin]].) + Respect Org Agenda restriction in =org-ql-block=. (Thanks to [[https://github.com/yantar92][Ihor Radchenko]] for reporting.) + Option =org-ql-view-sidebar-sort-views=. ++ Mouseover =help-echo= text for =org-ql-views= default view names. + +*Changed* ++ Rename some default =org-ql-views= views. (Users who have modified =org-ql-views= from the default will not see the new names unless they copy them into their config.) *Fixed* + Inherit file tags when =org-tag-inheritance= is enabled. (Fixes [[https://github.com/alphapapa/org-ql/issues/55][#55]]. Thanks to [[https://github.com/mskorzhinskiy][Mikhail Skorzhinskiy]].) diff --git a/org-ql-view.el b/org-ql-view.el index 54cde9b..07bbc87 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -120,67 +120,82 @@ See info node `(elisp)Cyclic Window Ordering'." :type 'boolean) (defcustom org-ql-views - (list (cons "Recent entries" #'org-ql-view-recent-items) - (cons "Review (to-do keyword without timestamp in past 2 weeks)" + (list (cons "Overview: Agenda-like" + (list :buffers-files #'org-agenda-files + :query '(and (not (done)) + (or (habit) + (deadline auto) + (scheduled :to today) + (ts-active :on today))) + :sort '(date priority todo) + :super-groups 'org-super-agenda-groups + :title "Agenda-like")) + (cons "Overview: NEXT tasks" + (list :buffers-files #'org-agenda-files + :query '(todo "NEXT") + :sort '(priority date) + :super-groups 'org-super-agenda-groups + :title "Overview: NEXT tasks")) + (cons "Calendar: Today" + (list :buffers-files #'org-agenda-files + :query '(ts-active :on today) + :title "Today" + :super-groups 'org-super-agenda-groups + :sort '(priority))) + (cons "Calendar: This week" + (lambda () + "Show items with an active timestamp during this calendar week." + (interactive) + (let* ((ts (ts-now)) + (beg-of-week (->> ts + (ts-adjust 'day (- (ts-dow (ts-now)))) + (ts-apply :hour 0 :minute 0 :second 0))) + (end-of-week (->> ts + (ts-adjust 'day (- 6 (ts-dow (ts-now)))) + (ts-apply :hour 23 :minute 59 :second 59)))) + (org-ql-search (org-agenda-files) + `(ts-active :from ,beg-of-week + :to ,end-of-week) + :title "This week" + :super-groups 'org-super-agenda-groups + :sort '(priority))))) + (cons "Calendar: Next week" + (lambda () + "Show items with an active timestamp during the next calendar week." + (interactive) + (let* ((ts (ts-adjust 'day 7 (ts-now))) + (beg-of-week (->> ts + (ts-adjust 'day (- (ts-dow (ts-now)))) + (ts-apply :hour 0 :minute 0 :second 0))) + (end-of-week (->> ts + (ts-adjust 'day (- 6 (ts-dow (ts-now)))) + (ts-apply :hour 23 :minute 59 :second 59)))) + (org-ql-search (org-agenda-files) + `(ts-active :from ,beg-of-week + :to ,end-of-week) + :title "Next week" + :super-groups 'org-super-agenda-groups + :sort '(priority))))) + (cons "Review: Recently timestamped" #'org-ql-view-recent-items) + (cons (propertize "Review: Stale tasks" + 'help-echo "Tasks without a timestamp in the past 2 weeks") (list :buffers-files #'org-agenda-files :query '(and (todo) (not (ts :from -14))) - :title "Review" + :title (propertize "Review: Stale tasks" + 'help-echo "Tasks without a timestamp in the past 2 weeks") :sort '(date priority todo) :super-groups '((:auto-parent t)))) - (cons "Stuck Projects" (list :buffers-files #'org-agenda-files - :query '(and (todo) - (children) - (not (children (todo "NEXT")))) - :title "Stuck Projects" - :sort '(priority date) - :super-groups 'org-super-agenda-groups)) - (cons "Agenda-like" (list :buffers-files #'org-agenda-files - :query '(and (not (done)) - (or (habit) - (deadline auto) - (scheduled :to today) - (ts-active :on today))) - :sort '(date priority todo) - :super-groups 'org-super-agenda-groups - :title "Agenda-like")) - (cons "Today" (list :buffers-files #'org-agenda-files - :query '(ts-active :on today) - :title "Today" - :super-groups 'org-super-agenda-groups - :sort '(priority))) - (cons "This week" (lambda () - "Show items with an active timestamp during this calendar week." - (interactive) - (let* ((ts (ts-now)) - (beg-of-week (->> ts - (ts-adjust 'day (- (ts-dow (ts-now)))) - (ts-apply :hour 0 :minute 0 :second 0))) - (end-of-week (->> ts - (ts-adjust 'day (- 6 (ts-dow (ts-now)))) - (ts-apply :hour 23 :minute 59 :second 59)))) - (org-ql-search (org-agenda-files) - `(ts-active :from ,beg-of-week - :to ,end-of-week) - :title "This week" - :super-groups 'org-super-agenda-groups - :sort '(priority))))) - (cons "Next week" (lambda () - "Show items with an active timestamp during the next calendar week." - (interactive) - (let* ((ts (ts-adjust 'day 7 (ts-now))) - (beg-of-week (->> ts - (ts-adjust 'day (- (ts-dow (ts-now)))) - (ts-apply :hour 0 :minute 0 :second 0))) - (end-of-week (->> ts - (ts-adjust 'day (- 6 (ts-dow (ts-now)))) - (ts-apply :hour 23 :minute 59 :second 59)))) - (org-ql-search (org-agenda-files) - `(ts-active :from ,beg-of-week - :to ,end-of-week) - :title "Next week" - :super-groups 'org-super-agenda-groups - :sort '(priority)))))) + (cons (propertize "Review: Stuck projects" + 'help-echo "Tasks with sub-tasks but no NEXT sub-tasks") + (list :buffers-files #'org-agenda-files + :query '(and (todo) + (children) + (not (children (todo "NEXT")))) + :title (propertize "Review: Stuck projects" + 'help-echo "Tasks with sub-tasks but no NEXT sub-tasks") + :sort '(priority date) + :super-groups 'org-super-agenda-groups))) "Alist of `org-ql-view' commands." :type '(alist diff --git a/org-ql.info b/org-ql.info index 0e6f41f..d9923f0 100644 --- a/org-ql.info +++ b/org-ql.info @@ -726,6 +726,12 @@ File: README.info, Node: 04-pre, Next: 032, Up: Changelog • Respect Org Agenda restriction in org-ql-block. (Thanks to Ihor Radchenko (https://github.com/yantar92) for reporting.) • Option org-ql-view-sidebar-sort-views. + • Mouseover help-echo text for org-ql-views default view names. + + *Changed* + • Rename some default org-ql-views views. (Users who have modified + org-ql-views from the default will not see the new names unless + they copy them into their config.) *Fixed* • Inherit file tags when org-tag-inheritance is enabled. (Fixes #55 @@ -1034,18 +1040,18 @@ Node: Agenda-like views18025 Node: Listing / acting-on results19430 Node: Changelog24032 Node: 04-pre24569 -Node: 03227023 -Node: 03127404 -Node: 0327599 -Node: 02330572 -Node: 02230798 -Node: 02131064 -Node: 0231261 -Node: 0135294 -Node: Notes35393 -Node: Comparison with Org Agenda searches35555 -Node: org-sidebar36426 -Node: License36705 +Node: 03227288 +Node: 03127669 +Node: 0327864 +Node: 02330837 +Node: 02231063 +Node: 02131329 +Node: 0231526 +Node: 0135559 +Node: Notes35658 +Node: Comparison with Org Agenda searches35820 +Node: org-sidebar36691 +Node: License36970  End Tag Table