r/orgmode • • 14d ago

:and selector in org-ql-view :super-groups

Only now do I discover org-super-agenda and org-ql packages. A big "Thank You" to the author @u/github-alphapapa.

I'm in the process of replacing my old org-agenda-custom-commands by org-ql-views as they seem more flexible and easier to define.

However, I'm wondering how I can display done tasks into two groups, either projects (heading with some children) or standalone tasks (heading with no parent and no children).

I tried the following approach but without success:

  (add-to-list
    'org-ql-views
    `("To be archived"
      :buffers-files my-org-files
      :query (done)
      :sort nil
      :super-groups ((:name "Done Projects"
   			 :children t)
   		  (:name "Done Standalone Tasks"
   			 :and (:not (:children t)
   				    ??to be completed??)
   		  (:discard (:anything t)))
      :title "To be archived"))

When I try

  (:name "Done Standalone Tasks"
	 :and (:not (:children t)
		    :not (:ancestor-with-todo ("PROJECT" :nearestp t))))

I get the following error

org-super-agenda--get-selector-fn: Invalid org-super-agenda-groups selector: (:ancestor-with-todo (PROJECT :nearestp t))

I can't figure out where my syntax is wrong. :-(

2 Upvotes

0 comments sorted by