org-ql icon indicating copy to clipboard operation
org-ql copied to clipboard

org-ql PEG parser crashes with lexical-binding error

Open garyo opened this issue 3 months ago • 5 comments

OS/platform

MacOS

Emacs version and provenance

Emacs latest, built from source: GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.5.0, NS appkit-2575.60 Version 15.5 (Build 24F74)) of 2025-07-20 built on m1-macbook.local Repository revision: 67ad73e50081f55999d5fba80876d720f05481cb Repository branch: master Windowing system distributor 'Apple', version 10.3.2575 System Description: macOS 15.6.1

Emacs command

Emacs

Org version and provenance

Org mode version 9.8-pre (9.8-pre-n/a-ge8413b) from github via elpaca

org-ql package version and provenance

0.9-pre 4b8330a (from github via elpaca)

Actions taken

Calling the string-query path (e.g. org-ql--query-string-to-sexp or org-ql-search with a string) triggers:

Debugger entered--Lisp error: (cl-assertion-failed (lexical-binding nil)) cl--assertion-failed(lexical-binding) (oclosure--lambda 'peg-function ...) ;; expanded by with-peg-rules / peg.el ...

Observed results

Stack trace and no query results produced.

Expected results

String queries should work. (Note: the sexp API works fine for me)

Backtrace

Debugger entered--Lisp error: (cl-assertion-failed (lexical-binding nil))
  cl--assertion-failed(lexical-binding)
  #f(compiled-function (type bindings mutables args &rest body) "Low level construction of an OClosure object.\nTYPE should be a form returning an OClosure type (a symbol).\nBINDINGS should list all the slots expected by this type, in the proper order.\nMUTABLE is a list of symbols indicating which of the BINDINGS\nshould be mutable.\nNo checking is performed." #<bytecode -0x45b4b6def56ba6a>)('peg-function ((pexs temp184)) nil nil (or (and (or (progn (while (let (... ...) (if ... ... ... nil))) t) (peg--record-failure '(* (set nil nil ...)))) (or (and (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)) (or (progn (while ...) t) (peg--record-failure '...))) (peg--record-failure '(and (and ... ...) (* ...))))) (peg--record-failure '(and (* (set nil nil (blank))) (and (and (call term) (* ...)) (* (and ... ...)))))))
  macroexpand-1((oclosure--lambda 'peg-function ((pexs temp184)) nil nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...))) ((peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce672894c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce673994c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce673694c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce670f94c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce67dd94c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0b8994c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0b8694c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bbf94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0ba494c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bcd94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bc294c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bd394c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bf194c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bfe94c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf13f794c4>)) (:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44) (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44)) (function . cl--labels-convert) (peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe3f94c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe2494c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4d94c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4294c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfef694c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfecf94c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfed494c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfe1d94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0f694c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0cf94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0d494c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfb192c7ba94c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bf80680d2894c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bf8f3d32a994c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfb160a00894c4>)) ...))
  macroexp-macroexpand((oclosure--lambda 'peg-function ((pexs temp184)) nil nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...))) ((peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce672894c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce673994c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce673694c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce670f94c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce67dd94c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0b8994c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0b8694c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bbf94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0ba494c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bcd94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bc294c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bd394c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bf194c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bfe94c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf13f794c4>)) (:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44) (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44)) (function . cl--labels-convert) (peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe3f94c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe2494c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4d94c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4294c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfef694c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfecf94c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfed494c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfe1d94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0f694c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0cf94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0d494c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfb192c7ba94c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bf80680d2894c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bf8f3d32a994c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfb160a00894c4>)) ...))
  macroexp--expand-all((oclosure--lambda 'peg-function ((pexs temp184)) nil nil (or (and (or (progn (while (let ... ...)) t) (peg--record-failure '(* ...))) (or (and (or (and ... ...) (peg--record-failure ...)) (or (progn ... t) (peg--record-failure ...))) (peg--record-failure '(and ... ...)))) (peg--record-failure '(and (* (set nil nil ...)) (and (and ... ...) (* ...)))))))
  macroexp--all-forms(((oclosure--lambda 'peg-function ((pexs temp184)) nil nil (or (and (or (progn (while ...) t) (peg--record-failure '...)) (or (and (or ... ...) (or ... ...)) (peg--record-failure '...))) (peg--record-failure '(and (* ...) (and ... ...)))))))
  macroexp--expand-all((peg--lambda '(and (* (set nil nil (blank))) (and (and (call term) (* (set nil nil ...))) (* (and (call term) (* ...))))) nil (or (and (or (progn (while (let ... ...)) t) (peg--record-failure '(* ...))) (or (and (or (and ... ...) (peg--record-failure ...)) (or (progn ... t) (peg--record-failure ...))) (peg--record-failure '(and ... ...)))) (peg--record-failure '(and (* (set nil nil ...)) (and (and ... ...) (* ...)))))))
  macroexpand-all((peg--lambda '(and (* ...) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...))) ((peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce672894c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce673994c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce673694c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce670f94c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbcce67dd94c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0b8994c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0b8694c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bbf94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0ba494c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bcd94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bc294c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bd394c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bf194c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf0bfe94c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfbccf13f794c4>)) (:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44) (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44)) (function . cl--labels-convert) (peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe3f94c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe2494c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4d94c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4294c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfef694c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfecf94c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfed494c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfe1d94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0f694c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0cf94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0d494c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfb192c7ba94c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bf80680d2894c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bf8f3d32a994c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfb160a00894c4>)) ...))
  #f(compiled-function (bind) #<bytecode -0x112e8407bdbe6853>)((--cl-peg-rule\ query-- peg-rule\ query (peg--lambda '(and (* (set nil nil (blank))) (and (and (call term) (* ...)) (* (and ... ...)))) nil (or (and (or (progn (while ...) t) (peg--record-failure '...)) (or (and (or ... ...) (or ... ...)) (peg--record-failure '...))) (peg--record-failure '(and (* ...) (and ... ...)))))))
  mapcar(#f(compiled-function (bind) #<bytecode -0x112e8407bdbe6853>) ((--cl-peg-rule\ query-- peg-rule\ query (peg--lambda '(and (* (set nil nil ...)) (and (and ... ...) (* ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ term-- peg-rule\ term (peg--lambda '(or (and (call negation) (and ... ...)) (or (call positive-term) (call empty-quote))) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (--cl-peg-rule\ positive-term-- peg-rule\ positive-term (peg--lambda '(or (and (call predicate-with-args) (action ...)) (or (and ... ...) (and ... ...))) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (--cl-peg-rule\ plain-string-- peg-rule\ plain-string (peg--lambda '(or (call quoted-arg) (call unquoted-arg)) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (--cl-peg-rule\ predicate-with-args-- peg-rule\ predicate-with-args (peg--lambda '(and (and (action ...) (and ... ...)) (and (char 58) (call args))) nil (or (and (or (and ... ...) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ predicate-without-args-- peg-rule\ predicate-without-args (peg--lambda '(and (and (action ...) (and ... ...)) (char 58)) nil (or (and (or (and ... ...) (peg--record-failure ...)) (or (when ... ... t) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ predicate-- peg-rule\ predicate (peg--lambda '(or (str "outline-path-segment") (or (str "org-back-to-heading") (or ... ...))) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (--cl-peg-rule\ args-- peg-rule\ args (peg--lambda '(and (action (let nil ...)) (and (and ... ...) (action ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ keyword-arg-- peg-rule\ keyword-arg (peg--lambda '(and (call keyword) (and (char 61) (action ...))) nil (or (and (or (peg-rule\ keyword) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ keyword-- peg-rule\ keyword (peg--lambda '(and (action (let nil ...)) (and (and ... ...) (action ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ quoted-arg-- peg-rule\ quoted-arg (peg--lambda '(and (char 34) (and (and ... ...) (char 34))) nil (or (and (or (when ... ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ unquoted-arg-- peg-rule\ unquoted-arg (peg--lambda '(and (action (let nil ...)) (and (and ... ...) (action ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (--cl-peg-rule\ empty-quote-- peg-rule\ empty-quote (peg--lambda '(str "\"\"") nil (or (when (looking-at '"\"\"") (goto-char (match-end 0)) t) (peg--record-failure '(str "\"\""))))) (--cl-peg-rule\ negation-- peg-rule\ negation (peg--lambda '(char 33) nil (or (when (eq (char-after) '33) (forward-char) t) (peg--record-failure '(char 33))))) (--cl-peg-rule\ separator-- peg-rule\ separator (peg--lambda '(char 44) nil (or (when (eq (char-after) '44) (forward-char) t) (peg--record-failure '(char 44)))))))
  #f(compiled-function (arg1 &rest rest) "Make local (recursive) function definitions.\n\nEach definition can take the form (FUNC EXP) where FUNC is the function\nname, and EXP is an expression that returns the function value to which\nit should be bound, or it can take the more common form (FUNC ARGLIST\nBODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY))\nwhere BODY is wrapped in a `cl-block' named FUNC.\n\nFUNC is in scope in any BODY or EXP, as well as in FORM, so you can write\nrecursive and mutually recursive function definitions, with the caveat\nthat EXPs are evaluated in sequence and you cannot call a FUNC before its\nEXP has been evaluated.\nSee Info node `(cl) Function Bindings' for details." #<bytecode -0x17b897188336bc26>)(((peg-rule\ query (peg--lambda '(and (* (set nil nil ...)) (and (and ... ...) (* ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ term (peg--lambda '(or (and (call negation) (and ... ...)) (or (call positive-term) (call empty-quote))) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (peg-rule\ positive-term (peg--lambda '(or (and (call predicate-with-args) (action ...)) (or (and ... ...) (and ... ...))) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (peg-rule\ plain-string (peg--lambda '(or (call quoted-arg) (call unquoted-arg)) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (peg-rule\ predicate-with-args (peg--lambda '(and (and (action ...) (and ... ...)) (and (char 58) (call args))) nil (or (and (or (and ... ...) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ predicate-without-args (peg--lambda '(and (and (action ...) (and ... ...)) (char 58)) nil (or (and (or (and ... ...) (peg--record-failure ...)) (or (when ... ... t) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ predicate (peg--lambda '(or (str "outline-path-segment") (or (str "org-back-to-heading") (or ... ...))) nil (or (let ((point ...) (actions peg--actions)) (or (or ... ...) (progn ... ... ...))) (peg--record-failure '(or ... ...))))) (peg-rule\ args (peg--lambda '(and (action (let nil ...)) (and (and ... ...) (action ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ keyword-arg (peg--lambda '(and (call keyword) (and (char 61) (action ...))) nil (or (and (or (peg-rule\ keyword) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ keyword (peg--lambda '(and (action (let nil ...)) (and (and ... ...) (action ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ quoted-arg (peg--lambda '(and (char 34) (and (and ... ...) (char 34))) nil (or (and (or (when ... ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ unquoted-arg (peg--lambda '(and (action (let nil ...)) (and (and ... ...) (action ...))) nil (or (and (or (progn ... t) (peg--record-failure ...)) (or (and ... ...) (peg--record-failure ...))) (peg--record-failure '(and ... ...))))) (peg-rule\ empty-quote (peg--lambda '(str "\"\"") nil (or (when (looking-at '"\"\"") (goto-char (match-end 0)) t) (peg--record-failure '(str "\"\""))))) (peg-rule\ negation (peg--lambda '(char 33) nil (or (when (eq (char-after) '33) (forward-char) t) (peg--record-failure '(char 33))))) (peg-rule\ separator (peg--lambda '(char 44) nil (or (when (eq (char-after) '44) (forward-char) t) (peg--record-failure '(char 44)))))) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure (peg-signal-failure failures)))))
  macroexpand-1((cl-labels ((peg-rule\ query (peg--lambda ... nil ...)) (peg-rule\ term (peg--lambda ... nil ...)) (peg-rule\ positive-term (peg--lambda ... nil ...)) (peg-rule\ plain-string (peg--lambda ... nil ...)) (peg-rule\ predicate-with-args (peg--lambda ... nil ...)) (peg-rule\ predicate-without-args (peg--lambda ... nil ...)) (peg-rule\ predicate (peg--lambda ... nil ...)) (peg-rule\ args (peg--lambda ... nil ...)) (peg-rule\ keyword-arg (peg--lambda ... nil ...)) (peg-rule\ keyword (peg--lambda ... nil ...)) (peg-rule\ quoted-arg (peg--lambda ... nil ...)) (peg-rule\ unquoted-arg (peg--lambda ... nil ...)) (peg-rule\ empty-quote (peg--lambda ... nil ...)) (peg-rule\ negation (peg--lambda ... nil ...)) (peg-rule\ separator (peg--lambda ... nil ...))) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure ...)))) ((:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44) (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44)) (function . cl--labels-convert) (peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe3f94c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe2494c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4d94c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4294c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfef694c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfecf94c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfed494c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfe1d94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0f694c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0cf94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0d494c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfb192c7ba94c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bf80680d2894c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bf8f3d32a994c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfb160a00894c4>)) (:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44))))
  macroexp-macroexpand((cl-labels ((peg-rule\ query (peg--lambda ... nil ...)) (peg-rule\ term (peg--lambda ... nil ...)) (peg-rule\ positive-term (peg--lambda ... nil ...)) (peg-rule\ plain-string (peg--lambda ... nil ...)) (peg-rule\ predicate-with-args (peg--lambda ... nil ...)) (peg-rule\ predicate-without-args (peg--lambda ... nil ...)) (peg-rule\ predicate (peg--lambda ... nil ...)) (peg-rule\ args (peg--lambda ... nil ...)) (peg-rule\ keyword-arg (peg--lambda ... nil ...)) (peg-rule\ keyword (peg--lambda ... nil ...)) (peg-rule\ quoted-arg (peg--lambda ... nil ...)) (peg-rule\ unquoted-arg (peg--lambda ... nil ...)) (peg-rule\ empty-quote (peg--lambda ... nil ...)) (peg-rule\ negation (peg--lambda ... nil ...)) (peg-rule\ separator (peg--lambda ... nil ...))) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure ...)))) ((:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44) (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44)) (function . cl--labels-convert) (peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe3f94c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe2494c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4d94c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4294c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfef694c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfecf94c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfed494c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfe1d94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0f694c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0cf94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0d494c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfb192c7ba94c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bf80680d2894c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bf8f3d32a994c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfb160a00894c4>)) (:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44))))
  macroexp--expand-all((cl-labels ((peg-rule\ query (peg--lambda '(and (* ...) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ term (peg--lambda '(or (and ... ...) (or ... ...)) nil (or (let (... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ positive-term (peg--lambda '(or (and ... ...) (or ... ...)) nil (or (let (... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ plain-string (peg--lambda '(or (call quoted-arg) (call unquoted-arg)) nil (or (let (... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ predicate-with-args (peg--lambda '(and (and ... ...) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ predicate-without-args (peg--lambda '(and (and ... ...) (char 58)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ predicate (peg--lambda '(or (str "outline-path-segment") (or ... ...)) nil (or (let (... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ args (peg--lambda '(and (action ...) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ keyword-arg (peg--lambda '(and (call keyword) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ keyword (peg--lambda '(and (action ...) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ quoted-arg (peg--lambda '(and (char 34) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ unquoted-arg (peg--lambda '(and (action ...) (and ... ...)) nil (or (and (or ... ...) (or ... ...)) (peg--record-failure '...)))) (peg-rule\ empty-quote (peg--lambda '(str "\"\"") nil (or (when (looking-at ...) (goto-char ...) t) (peg--record-failure '...)))) (peg-rule\ negation (peg--lambda '(char 33) nil (or (when (eq ... ...) (forward-char) t) (peg--record-failure '...)))) (peg-rule\ separator (peg--lambda '(char 44) nil (or (when (eq ... ...) (forward-char) t) (peg--record-failure '...))))) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure (peg-signal-failure failures))))))
  macroexpand-all((cl-labels ((peg-rule\ query (peg--lambda ... nil ...)) (peg-rule\ term (peg--lambda ... nil ...)) (peg-rule\ positive-term (peg--lambda ... nil ...)) (peg-rule\ plain-string (peg--lambda ... nil ...)) (peg-rule\ predicate-with-args (peg--lambda ... nil ...)) (peg-rule\ predicate-without-args (peg--lambda ... nil ...)) (peg-rule\ predicate (peg--lambda ... nil ...)) (peg-rule\ args (peg--lambda ... nil ...)) (peg-rule\ keyword-arg (peg--lambda ... nil ...)) (peg-rule\ keyword (peg--lambda ... nil ...)) (peg-rule\ quoted-arg (peg--lambda ... nil ...)) (peg-rule\ unquoted-arg (peg--lambda ... nil ...)) (peg-rule\ empty-quote (peg--lambda ... nil ...)) (peg-rule\ negation (peg--lambda ... nil ...)) (peg-rule\ separator (peg--lambda ... nil ...))) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure ...)))) ((:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44) (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44)) (function . cl--labels-convert) (peg-rule\ separator . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe3f94c4>)) (peg-rule\ negation . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe2494c4>)) (peg-rule\ empty-quote . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4d94c4>)) (peg-rule\ unquoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18abe4294c4>)) (peg-rule\ quoted-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfef694c4>)) (peg-rule\ keyword . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfecf94c4>)) (peg-rule\ keyword-arg . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfed494c4>)) (peg-rule\ args . #f(compiled-function (&rest args) #<bytecode -0x5bfb18bfe1d94c4>)) (peg-rule\ predicate . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0f694c4>)) (peg-rule\ predicate-without-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0cf94c4>)) (peg-rule\ predicate-with-args . #f(compiled-function (&rest args) #<bytecode -0x5bfb193d0d494c4>)) (peg-rule\ plain-string . #f(compiled-function (&rest args) #<bytecode -0x5bfb192c7ba94c4>)) (peg-rule\ positive-term . #f(compiled-function (&rest args) #<bytecode -0x5bf80680d2894c4>)) (peg-rule\ term . #f(compiled-function (&rest args) #<bytecode -0x5bf8f3d32a994c4>)) (peg-rule\ query . #f(compiled-function (&rest args) #<bytecode -0x5bfb160a00894c4>)) (:peg-rules (query and (* ...) (and ... ...)) (term or (and ... ...) (or ... ...)) (positive-term or (and ... ...) (or ... ...)) (plain-string or (call quoted-arg) (call unquoted-arg)) (predicate-with-args and (and ... ...) (and ... ...)) (predicate-without-args and (and ... ...) (char 58)) (predicate or (str "outline-path-segment") (or ... ...)) (args and (action ...) (and ... ...)) (keyword-arg and (call keyword) (and ... ...)) (keyword and (action ...) (and ... ...)) (quoted-arg and (char 34) (and ... ...)) (unquoted-arg and (action ...) (and ... ...)) (empty-quote str "\"\"") (negation char 33) (separator char 44))))
  #f(compiled-function (rules &rest body) "Make PEG rules RULES available within the scope of BODY.\nRULES is a list of rules of the form (NAME . PEXS), where PEXS is a sequence\nof PEG expressions, implicitly combined with `and'.\nRULES can also contain symbols in which case these must name\nrulesets defined previously with `define-peg-ruleset'." #<bytecode -0x1c23cead68651606>)(((query (and (* [blank]) (+ (and term (* [blank]))))) (term (or (and negation (list positive-term) `(pred -- (list ... ...))) positive-term empty-quote)) (positive-term (or (and predicate-with-args `(pred args -- (cons ... args))) (and predicate-without-args `(pred -- (list ...))) (and plain-string `(s -- (list org-ql-default-predicate s))))) (plain-string (or quoted-arg unquoted-arg)) (predicate-with-args (substring predicate) ":" args) (predicate-without-args (substring predicate) ":") (predicate (or "outline-path-segment" "org-back-to-heading" "deadline-warning" "heading-regexp" "tags-inherited" "inherited-tags" "outline-path" "tags-regexp" "descendants" "ts-inactive" "tags-local" "local-tags" "ancestors" "scheduled" "ts-active" "category" "priority" "property" "tags-all" "children" "deadline" "planning" "blocked" "heading" "clocked" "effort" "regexp" "parent" "closed" "tags-i" "tags-l" "habit" "level" "rifle" "smart" "tags&" "itags" "ltags" "tags*" "done" "link" "path" "tags" "todo" "olps" "ts-a" "ts-i" "src" "olp" ...)) (args (list (+ (and (or keyword-arg quoted-arg unquoted-arg) (opt separator))))) (keyword-arg (and keyword "=" `(kw -- (intern (concat ":" kw))))) (keyword (substring (+ (not (or separator "=" "\"" (syntax-class whitespace))) (any)))) (quoted-arg "\"" (substring (+ (not (or separator "\"")) (any))) "\"") (unquoted-arg (substring (+ (not (or separator "\"" (syntax-class whitespace))) (any)))) (empty-quote "\"\"") (negation "!") (separator ",")) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure (peg-signal-failure failures)))))
  (with-peg-rules ((query (and (* [blank]) (+ (and term (* [blank]))))) (term (or (and negation (list positive-term) `(pred -- (list ... ...))) positive-term empty-quote)) (positive-term (or (and predicate-with-args `(pred args -- (cons ... args))) (and predicate-without-args `(pred -- (list ...))) (and plain-string `(s -- (list org-ql-default-predicate s))))) (plain-string (or quoted-arg unquoted-arg)) (predicate-with-args (substring predicate) ":" args) (predicate-without-args (substring predicate) ":") (predicate (or "outline-path-segment" "org-back-to-heading" "deadline-warning" "heading-regexp" "tags-inherited" "inherited-tags" "outline-path" "tags-regexp" "descendants" "ts-inactive" "tags-local" "local-tags" "ancestors" "scheduled" "ts-active" "category" "priority" "property" "tags-all" "children" "deadline" "planning" "blocked" "heading" "clocked" "effort" "regexp" "parent" "closed" "tags-i" "tags-l" "habit" "level" "rifle" "smart" "tags&" "itags" "ltags" "tags*" "done" "link" "path" "tags" "todo" "olps" "ts-a" "ts-i" "src" "olp" ...)) (args (list (+ (and (or keyword-arg quoted-arg unquoted-arg) (opt separator))))) (keyword-arg (and keyword "=" `(kw -- (intern (concat ":" kw))))) (keyword (substring (+ (not (or separator "=" "\"" (syntax-class whitespace))) (any)))) (quoted-arg "\"" (substring (+ (not (or separator "\"")) (any))) "\"") (unquoted-arg (substring (+ (not (or separator "\"" (syntax-class whitespace))) (any)))) (empty-quote "\"\"") (negation "!") (separator ",")) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure (peg-signal-failure failures)))))
  eval((with-peg-rules ((query (and (* [blank]) (+ (and term (* ...))))) (term (or (and negation (list positive-term) `(pred -- ...)) positive-term empty-quote)) (positive-term (or (and predicate-with-args `(pred args -- ...)) (and predicate-without-args `(pred -- ...)) (and plain-string `(s -- ...)))) (plain-string (or quoted-arg unquoted-arg)) (predicate-with-args (substring predicate) ":" args) (predicate-without-args (substring predicate) ":") (predicate (or "outline-path-segment" "org-back-to-heading" "deadline-warning" "heading-regexp" "tags-inherited" "inherited-tags" "outline-path" "tags-regexp" "descendants" "ts-inactive" "tags-local" "local-tags" "ancestors" "scheduled" "ts-active" "category" "priority" "property" "tags-all" "children" "deadline" "planning" "blocked" "heading" "clocked" "effort" "regexp" "parent" "closed" "tags-i" "tags-l" "habit" "level" "rifle" "smart" "tags&" "itags" "ltags" "tags*" "done" "link" "path" "tags" "todo" "olps" "ts-a" "ts-i" "src" "olp" ...)) (args (list (+ (and (or keyword-arg quoted-arg unquoted-arg) (opt separator))))) (keyword-arg (and keyword "=" `(kw -- (intern ...)))) (keyword (substring (+ (not (or separator "=" "\"" ...)) (any)))) (quoted-arg "\"" (substring (+ (not (or separator "\"")) (any))) "\"") (unquoted-arg (substring (+ (not (or separator "\"" ...)) (any)))) (empty-quote "\"\"") (negation "!") (separator ",")) (peg-run (peg query) (lambda (failures) (when org-ql-signal-peg-failure (peg-signal-failure failures))))))
  #f(compiled-function (input &optional boolean) "Return query parsed from plain query string INPUT.\n  Multiple predicate-names are combined with BOOLEAN (default: `and')." #<bytecode 0x1aca23a02f139eac>)(":tag \"misc\"" nil)
  funcall(#f(compiled-function (input &optional boolean) "Return query parsed from plain query string INPUT.\n  Multiple predicate-names are combined with BOOLEAN (default: `and')." #<bytecode 0x1aca23a02f139eac>) ":tag \"misc\"" nil)
  (progn (setq-local lexical-binding t) (funcall orig input boolean))
  (unwind-protect (progn (setq-local lexical-binding t) (funcall orig input boolean)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (setq-local lexical-binding t) (funcall orig input boolean)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (with-current-buffer temp-buffer (unwind-protect (progn (setq-local lexical-binding t) (funcall orig input boolean)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (with-current-buffer temp-buffer (unwind-protect (progn (setq-local lexical-binding t) (funcall orig input boolean)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (with-temp-buffer (setq-local lexical-binding t) (funcall orig input boolean))
  go/org-ql--parse-in-lexical-buffer(#f(compiled-function (input &optional boolean) "Return query parsed from plain query string INPUT.\n  Multiple predicate-names are combined with BOOLEAN (default: `and')." #<bytecode 0x1aca23a02f139eac>) ":tag \"misc\"")
  apply(go/org-ql--parse-in-lexical-buffer #f(compiled-function (input &optional boolean) "Return query parsed from plain query string INPUT.\n  Multiple predicate-names are combined with BOOLEAN (default: `and')." #<bytecode 0x1aca23a02f139eac>) ":tag \"misc\"")
  org-ql--query-string-to-sexp(":tag \"misc\"")
  org-ql-search(("/Users/garyo/Documents/org-agenda/README.org" "/Users/garyo/Documents/org-agenda/journal.org" "/Users/garyo/Documents/org-agenda/misc.org" "/Users/garyo/Documents/org-agenda/tag-music.org") ":tag \"misc\"" :narrow nil :super-groups ((:auto-parent)) :sort (date))
  funcall-interactively(org-ql-search ("/Users/garyo/Documents/org-agenda/README.org" "/Users/garyo/Documents/org-agenda/journal.org" "/Users/garyo/Documents/org-agenda/misc.org" "/Users/garyo/Documents/org-agenda/tag-music.org") ":tag \"misc\"" :narrow nil :super-groups ((:auto-parent)) :sort (date))
  command-execute(org-ql-search record)
  #<subr execute-extended-command>(nil "org-ql-search" nil)
  ad-Advice-execute-extended-command(#<subr execute-extended-command> nil "org-ql-search" nil)
  apply(ad-Advice-execute-extended-command #<subr execute-extended-command> (nil "org-ql-search" nil))
  execute-extended-command(nil "org-ql-search" nil)
  funcall-interactively(execute-extended-command nil "org-ql-search" nil)
  command-execute(execute-extended-command)

Etc.

No response

garyo avatar Sep 01 '25 17:09 garyo

This is likely very related to this discussion on bug-gnu-emacs end of last year: https://lists.gnu.org/archive/html/bug-gnu-emacs/2024-12/msg00780.html -- that patch works for me.

garyo avatar Sep 01 '25 20:09 garyo

See #480

9viz avatar Sep 25 '25 12:09 9viz

Hi Gary,

Thanks for reporting and troubleshooting this issue.

Can you confirm that this bug only exists on Emacs 31.0.50 (i.e. the v31 pre-release builds)? Or, can you tell whether this change also works on earlier versions of Emacs before the change that was made to peg?

@9viz Thanks for the PR. Can you answer the two questions above? (Not that both of you need to.)

I just want to make sure that the change doesn't break existing users' software (especially before Emacs 31 is released).

alphapapa avatar Sep 29 '25 06:09 alphapapa

IIRC the change was made in the master branch after the emacs-30 branch was cut. A quick and dirty look at the two branches confirms it.

To ans the other question: I don't have access to non-master Emacs so I cannot test it out myself. But I don't think the change will be harmful. Eli mentioned recently the emacs-31 branch will be cut in a few months so it would be good to have this change early on IMO.

9viz avatar Oct 02 '25 05:10 9viz

Sorry, I keep all my machines updated with recent Emacs (master as of this year). Probably the best way to test, if you don't have CI github builds, is to spin up a docker container with an older Emacs. If I get some time I will try that, but as 9viz says I think this change is innocuous.

garyo avatar Oct 06 '25 11:10 garyo