Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example showing the combined use of org-ql-block and org-super-agenda #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions examples.org
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,44 @@ Of course, all of those presume using a =PROJECT= keyword to define projects. If
:super-groups '((:auto-parent t)))
#+END_SRC

Alternatively, =org-ql-block= and =org-super-agenda= can be combined to create a project view which lists projects and their associated tasks. Suppose you have an org file with the following structure:

#+BEGIN_SRC
* Inbox
** TODO Read Getting things done by David Allen
** TODO Reply to reddit post

* Next Tasks
** NEXT Clean car
** NEXT Donate old clothes

* Projects
** Construct house
*** NEXT Buy Wood

** Build electronics project
*** NEXT Order parts

** Plan vacation
*** NEXT Select hotel
#+END_SRC

Then using the following code:

#+BEGIN_SRC elisp
(setq org-agenda-custom-commands
'(("u" "My Agenda"
((org-ql-block '(and (todo) (ancestors "Projects"))
((org-ql-block-header "Projects")
(org-super-agenda-groups '((:auto-parent t)))))))))
#+END_SRC

will result in:

[[images/projectViewScreenshot.png]]

Additional =org-agenda-custom-commands= can be used with =org-ql-block= to create powerful agenda views.

Other interesting queries:

#+BEGIN_SRC elisp
Expand Down
Binary file added images/projectViewScreenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.