You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(defuntc/compare-entry (ba)
"Order entry A and B so that they appears from newest to oldest.This is like org-ql--date< but considering closed date too."
(cl-macrolet ((ts (item)
`(or (org-element-property :closed,item)
(org-element-property :deadline,item)
(org-element-property :scheduled,item))))
(org-ql--org-timestamp-element< (ts a) (ts b))))
(org-ql-select "~/org/projects.org"
'(and (done) (ts :from-3:to today))
:action'element-with-markers:sort'tc/compare-entry)
Etc.
Not sure if that is a bug of feature request.
The text was updated successfully, but these errors were encountered:
Thanks for sharing that. I'm always glad to learn about how people are using org-ql. BTW, you might find the dynamic blocks helpful for generating and updating reports like that without having to write much custom code: https://github.com/alphapapa/org-ql/#dynamic-block
OS/platform
Linux
Emacs version and provenance
GNU Emacs 30.0.50 built with nix
Emacs command
emacs
Org version and provenance
Org mode version 9.6.7 from nix
org-ql package version and provenance
0.7.1-pre from nix emacs-overlay
Actions taken
Custom format of a org-ql-select results
Observed results
The entries with a
:closed
date appears out of orderExpected results
The entries should be order similarly than in org-ql-search
Backtrace
Here is the problematic call:
And here is a workaround:
Etc.
Not sure if that is a bug of feature request.
The text was updated successfully, but these errors were encountered: