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: Thuna <thuna.cing <at> gmail.com>
Subject: bug#72328: closed (Re: bug#72328: [PATCH] Nested backquote in pcase)
Date: Tue, 24 Sep 2024 18:41:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#72328: [PATCH] Nested backquote in pcase

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 72328 <at> debbugs.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: 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


[Message part 3 (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 4 (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)]

This bug report was last modified 236 days ago.

Previous Next


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