From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74018: 31.0.50; Issue with define-peg-ruleset? Date: Sat, 26 Oct 2024 09:16:07 +0300 Message-ID: <86cyjnbd94.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16255"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74018@debbugs.gnu.org To: Stefan Monnier , Stefan Kangas , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 26 08:19:51 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t4a9O-00044d-Ep for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Oct 2024 08:19:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4a96-000630-K8; Sat, 26 Oct 2024 02:19:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4a93-00061s-Nh for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 02:19:30 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t4a93-00043N-F2 for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 02:19:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=8VeZXgW7xRomjtEvDHZYOx09VEG4mQud+SPs7mWxZAs=; b=cl3jtjN16a0xCWKbhoTPl0gx74ZkCkeYOQy8CFvwjXJVXd2syEwMDehku1TfKgKMSLglTllTrfT5fuCtiEftlSC+JTdWfMOZ/gZqMp7z84Npnyyjpfy0BZIvIiM2vADdl3AaRVOsRr5DdPqRUCfts4rTGoa+THQjeY5ijKV5byIFSgOXdZrtj2tVl6hrsyoQg5/3pgyg1Ge6mkyl++qdQOBP7aBSiIfRaV8HyIJgKcKRPrBXnRD/vhfctgfuSb210L4E1Tr1pPdn9FrFRhKfdvVJwcbMBCGm446kb06Lb1EevqVem35Lb57p5DnE4OfyteKAMcaORoVwK1cqn+4T+w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4a9Z-00027n-UE for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 02:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Oct 2024 06:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74018 X-GNU-PR-Package: emacs Original-Received: via spool by 74018-submit@debbugs.gnu.org id=B74018.17299235448076 (code B ref 74018); Sat, 26 Oct 2024 06:20:01 +0000 Original-Received: (at 74018) by debbugs.gnu.org; 26 Oct 2024 06:19:04 +0000 Original-Received: from localhost ([127.0.0.1]:40360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4a8d-00026C-KA for submit@debbugs.gnu.org; Sat, 26 Oct 2024 02:19:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4a8b-00025g-DV for 74018@debbugs.gnu.org; Sat, 26 Oct 2024 02:19:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t4a5r-0003tm-Hy; Sat, 26 Oct 2024 02:16:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8VeZXgW7xRomjtEvDHZYOx09VEG4mQud+SPs7mWxZAs=; b=ZyOoA9sNo0tM N674O6t1HGYbo43UUdx2X8vPxCavgj+WPBJJN5U+R78tPc3wDtiX35iFDLz7LUX+M84KWJIMEFsX7 +U9b/9OP2kGG43kOPgHWDMZOUndcRHxIru6qQh3c9bYIMHqscLiAIkBFiXf5G4T1zpI3s1ra1fFM3 Hkk6kd4QK7WPf0j9DugCcaCZWKQmZeipj4SeP0GgO4avy3fvjqSG2QcEyb3PLczKzUi0iWhff2bX2 cfMRIeW+uBxG0FcxfCndKJtdj17a22o/imz+y/zpBex2hXp3tCIDHaqSN086f6X3r0EyiUBBoVXUO oNeH3hFKkZOWc6dhCbCN6w==; In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294251 Archived-At: > Cc: monnier@iro.umontreal.ca > Date: Fri, 25 Oct 2024 16:30:30 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Version: 31.0.50 ^^^^^^^ Given what you say below, this is inaccurate. > Augusto pointed out a bug in `peg.el` when you have code like: > > (define-peg-ruleset myrules > (sign () (or "+" "-" "")) > (digit () [0-9]) > (nat () digit (* digit)) > (int () sign digit (* digit)) > (float () int "." nat)) > > (with-peg-rules > (myrules > (complex float "+i" float)) > (peg-parse nat "," nat "," complex) ) > > where the macroexpanded code is wrong and leads to errors like: > > Debugger entered--Lisp error: (void-function peg-rule\ nat) > > I was about to install the bugfix below to `master` but noticed that it > probably belongs to `emacs-30` instead since the bug makes > `define-peg-ruleset` basically unusable and PEG is new in Emacs-30. > > Any objection? I know nothing about peg.el, and you haven't explained the root cause for the bug for me to understand why it "makes `define-peg-ruleset' basically unusable", so let's hear from Stefan and Andrea first.