Change: (org-ql-views) Mouseover text, view names

This commit is contained in:
Adam Porter 2020-01-22 17:02:44 -06:00
parent 610b1179c6
commit 6beada4912
3 changed files with 93 additions and 68 deletions

View file

@ -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]].) + 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.) + 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=. + 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* *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]].) + 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]].)

View file

@ -120,67 +120,82 @@ See info node `(elisp)Cyclic Window Ordering'."
:type 'boolean) :type 'boolean)
(defcustom org-ql-views (defcustom org-ql-views
(list (cons "Recent entries" #'org-ql-view-recent-items) (list (cons "Overview: Agenda-like"
(cons "Review (to-do keyword without timestamp in past 2 weeks)" (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 (list :buffers-files #'org-agenda-files
:query '(and (todo) :query '(and (todo)
(not (ts :from -14))) (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) :sort '(date priority todo)
:super-groups '((:auto-parent t)))) :super-groups '((:auto-parent t))))
(cons "Stuck Projects" (list :buffers-files #'org-agenda-files (cons (propertize "Review: Stuck projects"
:query '(and (todo) 'help-echo "Tasks with sub-tasks but no NEXT sub-tasks")
(children) (list :buffers-files #'org-agenda-files
(not (children (todo "NEXT")))) :query '(and (todo)
:title "Stuck Projects" (children)
:sort '(priority date) (not (children (todo "NEXT"))))
:super-groups 'org-super-agenda-groups)) :title (propertize "Review: Stuck projects"
(cons "Agenda-like" (list :buffers-files #'org-agenda-files 'help-echo "Tasks with sub-tasks but no NEXT sub-tasks")
:query '(and (not (done)) :sort '(priority date)
(or (habit) :super-groups 'org-super-agenda-groups)))
(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))))))
"Alist of `org-ql-view' commands." "Alist of `org-ql-view' commands."
:type :type
'(alist '(alist

View file

@ -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 • Respect Org Agenda restriction in org-ql-block. (Thanks to Ihor
Radchenko (https://github.com/yantar92) for reporting.) Radchenko (https://github.com/yantar92) for reporting.)
• Option org-ql-view-sidebar-sort-views. • 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* *Fixed*
• Inherit file tags when org-tag-inheritance is enabled. (Fixes #55 • 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: Listing / acting-on results19430
Node: Changelog24032 Node: Changelog24032
Node: 04-pre24569 Node: 04-pre24569
Node: 03227023 Node: 03227288
Node: 03127404 Node: 03127669
Node: 0327599 Node: 0327864
Node: 02330572 Node: 02330837
Node: 02230798 Node: 02231063
Node: 02131064 Node: 02131329
Node: 0231261 Node: 0231526
Node: 0135294 Node: 0135559
Node: Notes35393 Node: Notes35658
Node: Comparison with Org Agenda searches35555 Node: Comparison with Org Agenda searches35820
Node: org-sidebar36426 Node: org-sidebar36691
Node: License36705 Node: License36970
 
End Tag Table End Tag Table