File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1132,6 +1132,27 @@ It would be expanded to:
1132
1132
(org-ql--define-query-preamble-fn (reverse org-ql-predicates))
1133
1133
(org-ql--def-query-string-to-sexp-fn (reverse org-ql-predicates))))))
1134
1134
1135
+ (defmacro org-ql-defpred-alias (name args docstring query )
1136
+ " Define an `org-ql' predicate alias to complex `org-ql' query.
1137
+ NAME may be a symbol or a list of symbols: if a list, the first
1138
+ is used as NAME and the rest are aliases.
1139
+
1140
+ ARGS is a `cl-defun' -style argument list. DOCSTRING is the
1141
+ function's docstring.
1142
+
1143
+ QUERY is a valid `org-ql' query."
1144
+ (declare (debug ([&or symbolp listp] listp stringp
1145
+ &rest (sexp query)))
1146
+ (indent defun ))
1147
+ `(org-ql-defpred , name , args
1148
+ , docstring
1149
+ :normalizers ((`(, predicate-names )
1150
+ (rec ', query )))
1151
+ :preambles ((`(, predicate-names )
1152
+ (rec ', query )))
1153
+ :body
1154
+ , query ))
1155
+
1135
1156
(defmacro org-ql--from-to-on ()
1136
1157
" For internal use.
1137
1158
Expands into a form that processes arguments to timestamp-related
You can’t perform that action at this time.
0 commit comments