Skip to content

Commit f5e80e4

Browse files
committed
Add: -invalid-selector error type
And use it in :property (others to be added later).
1 parent 6143718 commit f5e80e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

org-super-agenda.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ With prefix argument ARG, turn on if positive, otherwise off."
341341

342342
;;;; Group selectors
343343

344+
;; TODO: Write TODOs for places to use this custom error.
345+
(define-error 'org-super-agenda-invalid-selector "Invalid org-super-agenda selector" 'user-error)
346+
344347
(cl-defmacro org-super-agenda--defgroup (name docstring &key section-name test let*)
345348
"Define an agenda-item group function.
346349
NAME is a symbol that will be appended to `org-super-agenda--group-' to
@@ -689,7 +692,7 @@ test the value."
689692
(`(,property ,(and predicate (pred functionp)))
690693
(funcall predicate found-value))
691694
(_ ;; Oops
692-
(user-error "Second element of list argument to `:property' selector may be only a string or predicate")))))
695+
(signal 'org-super-agenda-invalid-selector (list (cons :property args)))))))
693696

694697
(org-super-agenda--defgroup regexp
695698
"Group items that match any of the given regular expressions.

0 commit comments

Comments
 (0)