GNU bug report logs - #72328
[PATCH] Nested backquote in pcase

Previous Next

Package: emacs;

Reported by: Thuna <thuna.cing <at> gmail.com>

Date: Sun, 28 Jul 2024 01:06:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#72328: closed ([PATCH] Nested backquote in pcase)
Date: Tue, 24 Sep 2024 18:41:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 24 Sep 2024 14:02:03 -0400
with message-id <jwv4j65j5gy.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#72328: [PATCH] Nested backquote in pcase
has caused the debbugs.gnu.org bug report #72328,
regarding [PATCH] Nested backquote in pcase
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
72328: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72328
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Thuna <thuna.cing <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Nested backquote in pcase
Date: Sun, 28 Jul 2024 02:40:00 +0200
[Message part 3 (text/plain, inline)]
Assuming a hypothetical `(pcase-assert OBJ PAT)' I would expect the
following to succeed:

  (pcase-assert '`,nil ``,nil)
  (pcase-assert '`,1 ``,,(pred integerp))
  (pcase-assert '`,@(list) ``,@,`(list . ,_))

which is to say: a comma should match its argument as a pattern only if
it escapes the original backquote (currently comma at all depths
"escape" the original backquote).

In case there is any interest in this, I have prepared a patch which
both adds the above as tests to pcase-tests.el and implements them in
pcase.el.

[0001-Handle-nested-backquotes-in-pcase.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 72328-done <at> debbugs.gnu.org,
 thuna.cing <at> gmail.com
Subject: Re: bug#72328: [PATCH] Nested backquote in pcase
Date: Tue, 24 Sep 2024 14:02:03 -0400
> Thanks, then Stefan, please feel free to install.

Done, thanks,


        Stefan



This bug report was last modified 237 days ago.

Previous Next


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