From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly Date: Tue, 20 Feb 2024 09:35:59 -0500 Message-ID: References: <87a5p5l3jm.fsf@localhost> <9bc2bd05-5fdb-9d5a-3d98-c344c7275027@gmail.com> <87sf2xjezi.fsf@localhost> <871q98hiqa.fsf@localhost> <8734to8gov.fsf@localhost> <87o7cbz21n.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5453"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Jim Porter , 68509@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 15:37:28 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 1rcRFP-0001Dn-HZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 15:37:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcREj-0003TR-KR; Tue, 20 Feb 2024 09:36:45 -0500 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 1rcREe-0003S8-VX for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 09:36:41 -0500 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 1rcREe-0006en-Mp for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 09:36:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcRF0-0002ZZ-4k for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 09:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68509 X-GNU-PR-Package: emacs Original-Received: via spool by 68509-submit@debbugs.gnu.org id=B68509.17084397969848 (code B ref 68509); Tue, 20 Feb 2024 14:37:02 +0000 Original-Received: (at 68509) by debbugs.gnu.org; 20 Feb 2024 14:36:36 +0000 Original-Received: from localhost ([127.0.0.1]:44658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcREZ-0002Yl-OJ for submit@debbugs.gnu.org; Tue, 20 Feb 2024 09:36:36 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcRET-0002YU-Kk for 68509@debbugs.gnu.org; Tue, 20 Feb 2024 09:36:33 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 64CF1441365; Tue, 20 Feb 2024 09:36:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708439760; bh=VembNqd3VqVLMqT+SSgYzQKc+J8TwKRKlzjT+JoXr8k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kEGF0NUC/7FCK5W/IIsiSohWdQXQTJ3tL06ZVw/9K/kAFIFrTiBEP2MWDjAJBZuI1 NwmI3ytfic6CzV0QiROipvS4lhS46FYD7ccpYs45487c4MQPQhuy8JE5cx2M9qJMId 1TmzK+E2L+LkuMeYg8c8tLTNlNqa+O+28jzGEQiaPHXlzrqHbAdfjs2TKaFbY/mIBo PyMZ6NHIrc69GSRMJFCqUzFl/3qKw9cjlz8dOXT0rbdvHWhBQFIcLxOLNiCgF049NL x2ojiDIkkz/6jcWiYelR8OfxhvogMcBpBvjF6DC5o5qWuJyUotp//8Tcs+2hMmkmGh xg0HremD949Uw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 453DF44134D; Tue, 20 Feb 2024 09:36:00 -0500 (EST) Original-Received: from pastel (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1D1E512008F; Tue, 20 Feb 2024 09:36:00 -0500 (EST) In-Reply-To: <87o7cbz21n.fsf@localhost> (Ihor Radchenko's message of "Tue, 20 Feb 2024 13:40:52 +0000") 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:280329 Archived-At: > What about adding extra option/keyword and also showing a runtime > warning when pcase-dolist/pcase-let encounter something that does not > match the pattern? In the current use of those primitives, it's routine/normal/common for a pattern like `(,a ,b) to encounter lists of different length than 2, so a warning should be emitted only if specifically requested via an option/keyword. I think it would be OK to emit a warning (even if not specifically requested via an option/keyword) when a value like (help . me) fails to match `(a . ,b), but as mentioned I don't know a good way to distinguish those two kinds of cases. Stefan