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#68113: Wrong error message triggered in cl--generic-standard-method-combination Date: Mon, 01 Jan 2024 23:39:57 -0500 Message-ID: References: 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="22734"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68113@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 02 05:41:25 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 1rKWai-0005kK-Fi for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jan 2024 05:41:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKWaM-0007dn-S6; Mon, 01 Jan 2024 23:41:02 -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 1rKWaL-0007dU-2G for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 23:41:01 -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 1rKWaK-0006Lq-Qa for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 23:41:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKWaM-0007IH-He for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 23:41: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, 02 Jan 2024 04:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68113 X-GNU-PR-Package: emacs Original-Received: via spool by 68113-submit@debbugs.gnu.org id=B68113.170417040927962 (code B ref 68113); Tue, 02 Jan 2024 04:41:02 +0000 Original-Received: (at 68113) by debbugs.gnu.org; 2 Jan 2024 04:40:09 +0000 Original-Received: from localhost ([127.0.0.1]:49169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKWZU-0007Gw-Ob for submit@debbugs.gnu.org; Mon, 01 Jan 2024 23:40:09 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKWZT-0007GY-7f for 68113@debbugs.gnu.org; Mon, 01 Jan 2024 23:40:07 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 463A68316B; Mon, 1 Jan 2024 23:39:59 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1704170398; bh=2SDsZCL4apRgy4PKg8IJDqsMC7t+uZvWSf7pDQ0vdHw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UN/86+6JJDJ8TJvHfMtU7y5fLkFu7tcvF9vaG/j+kApe8vk7q1hGD3jXnKg7UW57b nyChxxtWsmiTOtN2urzysKb/gPnXPbMM+/5GfWQWiS9fNMZDGrMB1M3HxuIRFvLMKj RgkOwvJ9b/VhSsLjrPswaVyKRRvb5A2YKU9/SgjP2KRyXXsr3MvpJ+Kdq3aTi5btvD URzTm89NEFCwilKiQbeL1yygG3GY7EpHDaT1npBV3wI8xOKz5L7+xLXiYivRipxLyx sAhq1YFhs++OLHVGlR92/gfJ5p58GMa5qk1biP2gkO2AX+lPeULKMU6eL9j6PIfjcU lmrbBx5hoLUuQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 30CB6807A4; Mon, 1 Jan 2024 23:39:58 -0500 (EST) Original-Received: from alfajor (unknown [207.96.224.130]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 12300120DB9; Mon, 1 Jan 2024 23:39:58 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Mon, 1 Jan 2024 19:36:29 +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:277212 Archived-At: > , and at the time of calling, qualifiers was nil. So the call boiled > down to > > (push method (alist-get nil mets-by-qual)) > > , and there was no element of mets-by-qual with a car of nil. So what > can the push macro do? There's no list to push onto. It can generate > code either > (i) to signal an error; or > (ii) to create a new element in the alist mets-by-qual with method being > the single element of its cdr. > > In actual fact, it does (i), but (as reported in the bug report) gives > the wrong message. But as I pointed out, the normal macroexpansion does (ii), so the problem *is* in the wrong macroexpansion. > That line of code is poor. It assumes that (alist-get (car qualifiers) > mets-by-qual) will always return a list element, No, it doesn't. The `gv-expander` for `alist-get` handles that case just fine (tho for some reason not in your case, obviously). > and fails to make any checks. It fails to check that qualifiers is > a non-empty list before taking its car. It's on purpose. The "nil" case is the common case, actually. This has been working fine since Emacs-25, remember. > Would you please check the code that signaled that error (you wrote it, I > think), and let me know whether you find anything suspicious in it. I already did. Did you try the patch I sent? Stefan