org-ql
org-ql copied to clipboard
"and" predicate appears to not be commutative (argument ordering gives different results)
running:
(org-ql-search org-agenda-files '(and (todo "ROUTINE" "NEXT" "AVAILABLE") (deadline :to today) ) )
will give me results, whereas running
(org-ql-search org-agenda-files '(and (deadline :to today) (todo "ROUTINE" "NEXT" "AVAILABLE") ) )
gives me no results.
Shouldn't ordering make no difference, here?
I am unable to reproduce this issue.
-
emacs-sandbox.sh -i org-ql
-
C-x C-f /tmp/172.org
. - Paste:
#+TODO: TODO ROUTINE NEXT AVAILABLE | CANCELLED DONE
* A
DEADLINE: <2020-12-23 Wed>
* ROUTINE B
DEADLINE: <2020-12-26 Sat>
* NEXT C
DEADLINE: <2020-12-25 Fri>
* AVAILABLE D
DEADLINE: <2020-12-24 Thu>
* E
DEADLINE: <2020-12-22 Tue>
-
M-< C-c C-c
. -
C-c [
. -
M-: (org-ql-search org-agenda-files '(and (todo "ROUTINE" "NEXT" "AVAILABLE") (deadline :to today) ) ) RET
. -
M-: (org-ql-search org-agenda-files '(and (deadline :to today) (todo "ROUTINE" "NEXT" "AVAILABLE") ) ) RET
.
Both show the same results:
ROUTINE B 1d ago
NEXT C 2d ago
AVAILABLE D 3d ago
ok - thanks for the quick response! I'll follow up and try to repro with the rest of my config stripped out.