Hi Stefan, The recent change you made in commit 986621ae1ff4d3cfad31adb20216f1f71ce0747c Author: Stefan Monnier Date: Tue Nov 12 23:12:07 2024 -0500 (with-peg-rules): Build proper `peg-function`s * lisp/progmodes/peg.el (with-peg-rules): Use the new (FUNC EXP) feature in `cl-labels`. broke org-ql's PEG parser. I tried to reproduce it with the number parser example given in the Elisp Info manual but failed. With the above change, I get an assertion error when I try to use org-ql-find: 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." #)('peg-function ((pexs temp1848)) 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 ... ...))))))) ... [ The full backtrace is attached in backtrace.txt. ] I attached the function that uses with-peg-rules in query-fn.el. Reverting said change makes the error go away. Unfortunately, all of this stuff is beyond me so I cannot tell if the problem is with peg.el or if org-ql is messing up somehow.