Skip to content

Instantly share code, notes, and snippets.

@alphapapa
Forked from mskorzhinskiy/org-ql-rasmi.el
Created December 18, 2020 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphapapa/4565ac137b27325a06b104dfe9b6bc7d to your computer and use it in GitHub Desktop.
Save alphapapa/4565ac137b27325a06b104dfe9b6bc7d to your computer and use it in GitHub Desktop.
Current configuration for personal org queries
(setq
org-ql-views
'(("stuck" lambda nil
(interactive)
(org-ql-search
(org-agenda-files)
'(and (tags "story")
(not (tags "ignore"))
(not (done)) ;; Finished stories should be excluded
(not (descendants (todo "NEXT"))) ;; If there are already
;; something in progress
;; it will shown
(and (not (descendants (done))) ;; There are not scheduled not finished items
(not (descendants (scheduled)))))
:narrow nil :super-groups
'((:name "Waiting" :order 8 :todo "WAIT")
(:name "Important" :order 1 :deadline t :priority>= "B")
(:name "Work" :order 2 :tag "work")
(:name "Study" :order 2 :tag "study")
(:name "Stucked" :order 3 :tag "story"))
:title "stuck-projects"))
("reports" lambda nil
(interactive)
(org-ql-search
(org-agenda-files)
'(and (or (tags-local "weekly")
(tags-local "monthly"))
(not (tags "ignore")))
:narrow nil :super-groups
'((:name "Weekly reports" :tag "weekly")
(:name "Monthly reports" :tag "monthly"))
:title "Introspection reports"))
("next" lambda nil
(interactive)
(org-ql-search
(org-agenda-files)
'(and (or (tags-local "refile")
(todo "PROG")
(todo "WAIT")
(todo "NEXT"))
(not (tags "ignore"))
(not (property "linked"))
(not (done)))
:sort '(date)
:narrow nil
:super-groups
`((:name "In progress" :order 1 :todo "PROG")
(:name "Daily" :order 2 :regexp ,org-repeat-re)
(:name "Waiting" :order 3 :todo "WAIT")
(:name "Refile" :order 3 :tag "refile")
(:name "Important" :order 3 :priority>= "B")
(:auto-tags t :order 5))
:title "Next actions"))
("calendar" lambda nil
(interactive)
(org-ql-search
(org-agenda-files)
`(and (ts-active)
(regexp ,org-scheduled-time-hour-regexp)
(not (done)))
:sort '(date)
:narrow nil
:super-groups
'((:auto-planning t))
:title "Calendar"))
("dashboard" lambda nil
(interactive)
(org-ql-search
(org-agenda-files)
'(and (or (ts-active :to today)
(deadline auto)
(todo "PROG")
(and (tags "journal")
(not (tags "weekly"))
(not (tags "monthly"))
(not (tags "yearly"))
(todo)))
(not (todo "WAIT"))
(not (tags "ignore"))
(not (property "linked"))
(not (done)))
:sort '(date)
:narrow nil
:super-groups
`((:name "In progress" :order 1
:tag "monthly" :tag "weekly" :todo "PROG")
(:name "Agenda" :order 2
:deadline t :regexp ,org-scheduled-time-hour-regexp)
(:name "Daily" :order 2
:and (:todo nil :regexp ,org-repeat-re))
(:name "Today" :order 3 :tag "journal")
(:name "Important" :order 3 :priority>= "B")
(:auto-tags t :order 5))
:title "Dashboard"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment