From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marco Antoniotti Newsgroups: gmane.emacs.bugs Subject: bug#70597: Problem in pcase-let? Date: Sat, 4 May 2024 14:06:45 +0200 Message-ID: References: <662d23bf.050a0220.a4e2f.3f45@mx.google.com> <865xvwmus2.fsf@gnu.org> <861q6hhks0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003de35b06179fac33" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19124"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brubar.cs@gmail.com, monnier@iro.umontreal.ca, 70597-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 04 14:08:07 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 1s3EBS-0004jj-V3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 May 2024 14:08:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3EB8-0000hH-8c; Sat, 04 May 2024 08:07:46 -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 1s3EB4-0000g8-5R for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 08:07:42 -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 1s3EB1-0003v9-HX for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 08:07:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3EBO-0007t0-2c for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 08:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marco Antoniotti Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2024 12:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70597 X-GNU-PR-Package: emacs Original-Received: via spool by 70597-done@debbugs.gnu.org id=D70597.171482445030306 (code D ref 70597); Sat, 04 May 2024 12:08:02 +0000 Original-Received: (at 70597-done) by debbugs.gnu.org; 4 May 2024 12:07:30 +0000 Original-Received: from localhost ([127.0.0.1]:53403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3EAs-0007sk-3U for submit@debbugs.gnu.org; Sat, 04 May 2024 08:07:30 -0400 Original-Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]:56386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3EAn-0007sX-Vg for 70597-done@debbugs.gnu.org; Sat, 04 May 2024 08:07:28 -0400 Original-Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-de5b1e6beceso574835276.0 for <70597-done@debbugs.gnu.org>; Sat, 04 May 2024 05:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714824417; x=1715429217; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kvEkuyPWRK8AtL/fxOGroJ22b/Th2A6E9LK8nNHpbT0=; b=gIWJv0sUkGACZ5D1aAE+Xl/+X3j6c7bY/+PdQimkWRyAlOKFBgLaOYR7mg0Q6xaQeQ SfoV27Do4USzgxFrtjpdyTISfVPCFpx56p9dx/0NdlU5o8gHuM6fX83qEPfNbo1VjMrQ H8fC09AJ3lDLYxFG/Iv8x5fFnXAzn9ud2HXQjJv4SY3zmhFRti4gEApEKbeVHse5XOP7 kxqjXTdN1hu7HS5ELbSpQ9ljm/CBkELhK5GlJlX4Kbak0C5PDWEwY9eS5cnWV489YB6s 2NEqlSc1JYjXAtQgipe/cXOt1QhmWCtHerC8m7Uwa5fsrS4leMbbns9d/G56R6JXmUQX Ilyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714824417; x=1715429217; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kvEkuyPWRK8AtL/fxOGroJ22b/Th2A6E9LK8nNHpbT0=; b=XBeD7pojxgMSip/8wSq49BSbQgYsDF5BkvhsSwqU6sD1qTqeg7LmyflR1/e/a//2Ye YbJPgzzMPlPygMMrZ2q2G3h7YkHCMEXDCWOrMYAHVQOvY+nh6UNFa5B8aApwfU7cF0RN ZovGTytQ7HuInU5xKdbYU1tEAFoxOOrtIf+fxobpwBL70iGTyQLD6wVQV2DOakaSxddx 8HYuziH2fmpYn6UVPpaznTE1uV0wtfU+C3R6FM8TmXUw9GMg/bWzhWxgn+RsrAruVpRy r8Xn5muZlmBqc/MIXbHXj1qQiLt2xhJbuk5xAAhWpi8p7sVu6r/TqKj4hDXUFJJ2zceR n9oQ== X-Forwarded-Encrypted: i=1; AJvYcCXz6ck7Z/H+dUW4fubBzH0SZlv7YOG7UWO7XY6MgKccvH2ZHrnHFHs9CCUXPCMhPQmDj0Wc0/GGf5bJdLVbEzhJNXO6gbNPvT4HDw== X-Gm-Message-State: AOJu0YzBHi0kobQ6YsBaGMVBJfztvNl9l0aeqsLaPLwKGpih6sv8PhjK 7zGKzAH6p5LJTy24KnxFmPMX407o4U+dbtHDYKT1t7Nup72sOjnJQOg3dfbhkJ639EVCjWB3aMK CAwWDeMkMn5y4Z5Tgpdes0D5AcmQ= X-Google-Smtp-Source: AGHT+IEOLtftvHFIZKDaegXXX+J4IZ3Oyvr0RWkIbhUUUItelbANDzNWHA4KZT7qr1xmzekyUXEMr0AkmJ+Gwym/+ME= X-Received: by 2002:a25:3624:0:b0:de5:53c0:b9e5 with SMTP id d36-20020a253624000000b00de553c0b9e5mr5631814yba.40.1714824417237; Sat, 04 May 2024 05:06:57 -0700 (PDT) In-Reply-To: <861q6hhks0.fsf@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:284422 Archived-At: --0000000000003de35b06179fac33 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi sorry, but I do not think that the current doc string and/or the manual explains the situation. And it looks like this is a recurring misunderstanding by the users. Just adding the example would clarify things. All the best MA On Sat, May 4, 2024 at 1:35=E2=80=AFPM Eli Zaretskii wrote: > > From: Marco Antoniotti > > Date: Thu, 2 May 2024 13:06:58 +0200 > > Cc: Stefan Monnier , brubar.cs@gmail.com, > 70597@debbugs.gnu.org > > > > it's your call. But please change the doc string to clarify that > pcase-let does not do "symbol equality" pattern > > matching, but only structural matching. Adding an example like the > following will help. > > > > (pcase-let ((`(foo ,x 23 ,y) '(bar 11 baz 22))) (list x y)) > > This is already explained in the ELisp manual, and the doc string > already says > > Each EXP should match its respective PATTERN (i.e. be of structure > compatible to PATTERN) > > So I don't think we need to do anything else here, and I'm closing > this bug. > --=20 Marco Antoniotti Somewhere over the Rainbow --0000000000003de35b06179fac33 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

sorry, but I do not think that t= he current doc string and/or the manual explains the situation.

And it looks like this is a recurring misunderstanding by the users.=

Just adding the example would clarify things.

All the best

MA

On Sat, May 4, 2024 at 1:35=E2=80=AFPM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Marco Antoniotti <marcoxa@gmail.com> > Date: Thu, 2 May 2024 13:06:58 +0200
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, brubar.cs@gmail.com, 70597@debbugs.gnu.org
>
> it's your call.=C2=A0 But please change the doc string to clarify = that pcase-let does not do "symbol equality" pattern
> matching, but only structural matching.=C2=A0 Adding an example like t= he following will help.
>
> (pcase-let ((`(foo ,x 23 ,y) '(bar 11 baz 22))) (list x y))

This is already explained in the ELisp manual, and the doc string
already says

=C2=A0 Each EXP should match its respective PATTERN (i.e. be of structure =C2=A0 compatible to PATTERN)

So I don't think we need to do anything else here, and I'm closing<= br> this bug.


--
Marco Antonio= tti
Somewhere over the Rainbow
--0000000000003de35b06179fac33--