Skip to content

Commit e6bde30

Browse files
committed
Feat: Enable all valid priority values
Expand recognised priority values from A-C to current org-mode standard of A-Z and 0-64. Futher work is required to use `org-get-priority-function` and support custom priority values.
1 parent b6f8a31 commit e6bde30

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

org-ql.el

+4-5
Original file line numberDiff line numberDiff line change
@@ -1735,15 +1735,14 @@ priority B)."
17351735
`(priority ',comparator ,letter)))
17361736

17371737
:preambles
1738-
(;; NOTE: This only accepts A, B, or C. I haven't seen
1739-
;; other priorities in the wild, so this will do for now.
1740-
(`(,predicate-names)
1738+
((`(,predicate-names)
17411739
;; Any priority cookie.
1742-
(list :regexp (rx-to-string `(seq bol (1+ "*") (1+ blank) (0+ nonl) "[#" (in "ABC") "]") t)))
1740+
(list :regexp (rx-to-string `(seq bol (1+ "*") (1+ blank) (0+ nonl) "[#" (or (in "A-Z") (1+ (in "0-9"))) "]") t)))
17431741
(`(,predicate-names ,(and (or ''= ''< ''> ''<= ''>=) comparator) ,letter)
17441742
;; Comparator and priority letter.
17451743
;; NOTE: The double-quoted comparators. See below.
1746-
(let* ((priority-letters '("A" "B" "C"))
1744+
(let* ((priority-letters (append (mapcar #'number-to-string (number-sequence 0 64))
1745+
(mapcar #'string (number-sequence ?A ?Z))))
17471746
(index (-elem-index letter priority-letters))
17481747
;; NOTE: Higher priority == lower number.
17491748
;; NOTE: Because we need to support both preamble-based queries and

0 commit comments

Comments
 (0)