GNU bug report logs - #74735
31.0.50; Commit 986621ae1ff4d3cfad31adb20216f1f71ce0747c broke org-ql

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Sun, 8 Dec 2024 11:10:02 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #11 received at 74735 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 74735 <at> debbugs.gnu.org
Subject: Re: bug#74735: 31.0.50; Commit
 986621ae1ff4d3cfad31adb20216f1f71ce0747c broke org-ql
Date: Sat, 14 Dec 2024 07:13:23 +0530
[வெள்ளி டிசம்பர் 13, 2024] Stefan Monnier wrote:

>> The recent change you made in
>>
>>     commit 986621ae1ff4d3cfad31adb20216f1f71ce0747c
>>     Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
>>     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))
>
> Thanks.  Until this is fixed on `master`, the patch below will fix
> `org-ql` to use lexical-binding for that code (like it already does for
> all the rest of the code).

Thanks!  I tried this exact change but it still erred.  Now, the error
went away.  I guess I did not re-eval the relevant functions properly.

> [ It also removes a NUL byte from the file which caused some tools to
>   treat it as a binary file.  ]

Thanks for catching this!  I always wondered why the modeline did not
say 'U' for the encoding.

> diff --git a/org-ql.el b/org-ql.el
> index f3b7715..654da49 100644
> --- a/org-ql.el
> +++ b/org-ql.el
> @@ -863,7 +863,7 @@ respectively."
>                                        (zero-or-more (not (any "\n\":"))))
>                                   (zero-or-more (not (any "\n\":")))))
>                        (group (zero-or-more (not (any "\n")))) "\n"
> -                      (63 (group (*\? (not (any "."))) "\n"))
> +                      (63 (group (*\? (not (any "\0"))) "\n"))
>                        (zero-or-more (any "	 "))
>                        "#+end_src")
>                  t))
> @@ -1003,7 +1003,8 @@ value of `org-ql-predicates')."
>                                           (peg-run (peg ,(caar pexs))
>                                                    (lambda (failures)
>                                                      (when org-ql-signal-peg-failure
> -                                                      (peg-signal-failure failures)))))))))
> +                                                      (peg-signal-failure failures)))))
> +                                      t))))
>                          (pcase parsed-sexp
>                            (`(,one-predicate) one-predicate)
>                            (`(,_ . ,_) (cons boolean (reverse parsed-sexp)))

Shall I notify Adam of this change?




This bug report was last modified 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.