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#65344: 28.2; Unable to Edebug cl-flet form which uses argument destructuring Date: Fri, 01 Sep 2023 19:24:56 -0400 Message-ID: References: <5184DD53-F121-405D-AEE9-6E72E17127EA@gmail.com> 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="10524"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Michael Heerdegen , brandon.irizarry@gmail.com, Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Michael Albinus , 65344@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 02 01:26:14 2023 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 1qcDWn-0002Tg-WB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Sep 2023 01:26:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcDWV-0003YH-31; Fri, 01 Sep 2023 19:25:55 -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 1qcDWT-0003We-93 for bug-gnu-emacs@gnu.org; Fri, 01 Sep 2023 19:25:53 -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 1qcDWT-0006Vf-1D for bug-gnu-emacs@gnu.org; Fri, 01 Sep 2023 19:25:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qcDWc-0006Xj-Cy for bug-gnu-emacs@gnu.org; Fri, 01 Sep 2023 19:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Sep 2023 23:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65344 X-GNU-PR-Package: emacs Original-Received: via spool by 65344-submit@debbugs.gnu.org id=B65344.169361071725097 (code B ref 65344); Fri, 01 Sep 2023 23:26:02 +0000 Original-Received: (at 65344) by debbugs.gnu.org; 1 Sep 2023 23:25:17 +0000 Original-Received: from localhost ([127.0.0.1]:34455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcDVs-0006Wj-IM for submit@debbugs.gnu.org; Fri, 01 Sep 2023 19:25:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcDVq-0006WR-FR for 65344@debbugs.gnu.org; Fri, 01 Sep 2023 19:25:15 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 42BDF80C61; Fri, 1 Sep 2023 19:24:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693610697; bh=cFpE/lDDtGpvT4QcjxboYqub1Ey2HZ2VE/hBdIK45ds=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BF7xT0MsqQekpKSwxg45MfdIPRkuYFzSZ1kNtbWIQAQulmzCCCWymyJ24fB3vlg52 vjZCuFI7y6TyDaGtfr0uVgkZFooro/Ai5otXgZrYjMnVlAfZTlQg7yeXnIkUfubcQJ X9pA5i5miwmmo8q2R/mrA3eSuBZX8w7HQyvvOjz/Rv+77fSlWCwfg0EwLibDL+qkW2 aktFP0V1XThGR9g/7hxar5m6y9RQY8bQoCu2T7Wf8l9sdZnePc4eRXeyy7H2UeKo2u KShoFTpaggSrwfImkEuvB67E+pzzP/Dy1nasmS84r5L2Gccn+2pJX9hRvx4NJq/Z6I ZHXGBFNYpeIEw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id BC86780430; Fri, 1 Sep 2023 19:24:57 -0400 (EDT) Original-Received: from pastel (unknown [45.72.228.218]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 431611203C7; Fri, 1 Sep 2023 19:24:57 -0400 (EDT) In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Wed, 23 Aug 2023 16:08:24 +0200") 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:268940 Archived-At: > The problem seems to be the attempt to first match the spec > > (&define [&name symbolp "@cl-flet@"] > [&name [] gensym] ;Make it unique! > def-form)]) I think this is not right: - `def-form` is for use by forms which will be run "later", meaning that we can start executing those instrumented form while running non-instrumented code (like the inside of a lambda), so it should not be needed here: we should use just `form`. - The &define+&name isn't quite right here. In `(cl-flet ((F EXP)) ...)` it tells Edebug that EXP should be given the name F whereas the `cl-flet` actually gives the name F to the value returned by EXP. [ In terms of code coverage, F will then always be considered as covered just because we have to execute EXP in order to discover the function to bind to F. ] I think that's why the old code had just `(symbolp form)`: it's difficult with `(cl-flet ((F EXP)) ...)` to give a name to the right thing :-( Stefan