unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 74735@debbugs.gnu.org
Subject: bug#74735: 31.0.50; Commit 986621ae1ff4d3cfad31adb20216f1f71ce0747c broke org-ql
Date: Sat, 14 Dec 2024 07:13:23 +0530	[thread overview]
Message-ID: <871pyb11l0.fsf@gmail.com> (raw)
In-Reply-To: <jwvbjxfp6re.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 13 Dec 2024 17:21:07 -0500")

[வெள்ளி டிசம்பர் 13, 2024] Stefan Monnier wrote:

>> The recent change you made in
>>
>>     commit 986621ae1ff4d3cfad31adb20216f1f71ce0747c
>>     Author: Stefan Monnier <monnier@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?





      reply	other threads:[~2024-12-14  1:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-08 11:09 bug#74735: 31.0.50; Commit 986621ae1ff4d3cfad31adb20216f1f71ce0747c broke org-ql Visuwesh
2024-12-13 22:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-14  1:43   ` Visuwesh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871pyb11l0.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=74735@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).