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#48585: 28.0.50; Missing Edebug instrumentation for some 'if-let' variants Date: Sat, 16 Jul 2022 18:25:55 -0400 Message-ID: References: <87wncen0jq.fsf@gnus.org> 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="34342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Philipp , 48585@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 17 00:27:11 2022 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 1oCqFi-0008kS-Rt for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jul 2022 00:27:11 +0200 Original-Received: from localhost ([::1]:43490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oCqFh-0006wx-BH for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Jul 2022 18:27:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCqFa-0006v0-M3 for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2022 18:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oCqFa-0004t6-DT for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2022 18:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oCqFa-0000lj-7P for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2022 18:27: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: Sat, 16 Jul 2022 22:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48585 X-GNU-PR-Package: emacs Original-Received: via spool by 48585-submit@debbugs.gnu.org id=B48585.16580103672887 (code B ref 48585); Sat, 16 Jul 2022 22:27:02 +0000 Original-Received: (at 48585) by debbugs.gnu.org; 16 Jul 2022 22:26:07 +0000 Original-Received: from localhost ([127.0.0.1]:46288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCqEh-0000kU-2P for submit@debbugs.gnu.org; Sat, 16 Jul 2022 18:26:07 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oCqEe-0000k0-IQ for 48585@debbugs.gnu.org; Sat, 16 Jul 2022 18:26:05 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A7852441650; Sat, 16 Jul 2022 18:25:58 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3DE6C4415E5; Sat, 16 Jul 2022 18:25:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1658010357; bh=It8M6vAo/ROpkQtTqU+0tnpPo4Lw5bkrYvGrLWnHEsw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Wpq2AFha8nxtEcjOv+s4Q1N+8orjoeXCNT8FTLWCn6Jr4rWO9iCFySEMJ6aSiSC9I lq2gPmUGxZXWMmy93gVSSysLZKBgh0nqCOR7owa5+KwoVDBRxBqsahZj3QmhytqiIS FFsVwZtCx9Oa7NzfvTJXHt4GATuQtSjcYvJ89443ZXkFvmfHUR9ZoJMSv8NE+cDwBZ qvcjGCjDOO6ZjbmmjRyEZbtXLfPH9UTuTTWQr1o9l4KBGW/AvEQqq5gj4u0AOsj+FP cdK7DbFfmcpR5CqaWpTr2hEmdR5Cj5qwa4+f1BjrybIGeBxuOsDkYAhnnfCZlrEigZ EKRKlrPycP/SA== Original-Received: from alfajor (unknown [45.72.196.165]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 053E912084F; Sat, 16 Jul 2022 18:25:56 -0400 (EDT) In-Reply-To: <87wncen0jq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 15 Jul 2022 12:16:25 +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" Xref: news.gmane.io gmane.emacs.bugs:237214 Archived-At: >> The 'symbolp' specification element causes Edebug to not instrument the >> 'x' symbol. However, the 'symbolp' specification is also necessary >> here; we couldn't just replace it with 'form' because that would make >> the branches overlap. What we'd need here is something like >> [&and symbolp form], i.e. match only in case of a symbol, but also >> instrument as a form. IIUC Edebug doesn't support such constructs yet. > > Perhaps Stefan has some comments here; added to the CCs. The instrumentation takes place before expanding the macro, so either we instrument the `x` into a form (edebug- ... x ...) or we leave the `x` untouched and have no instrumentation. We can't have it both ways from that side. So if we want the occurrence of `x` which *evaluates* `x` (as opposed to the occurrence that *binds* the new variable) to be instrumented, we need to change the macro to accept a "variable name" of the form (edebug- ... x ...) and somehow strip the edebug instrumentation when we use the argument as a variable name in a binding position. As someone who doesn't much like `if-let`, I'll let someone else figure out how to that somewhat cleanly. Also to be honest I also wonder if that would be worthwhile. Stefan