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#65516: 30.0.50; Edebug behavior of signaling errors in &or Date: Tue, 29 Aug 2023 11:35:22 -0400 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="16017"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Michael Heerdegen , 65516@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 Tue Aug 29 17:37:13 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 1qb0mF-0003sE-B6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Aug 2023 17:37:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qb0m2-00036z-Lh; Tue, 29 Aug 2023 11:36:58 -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 1qb0lz-00036Q-OE for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 11:36:55 -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 1qb0lz-0000cL-GR for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 11:36:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qb0m5-0002qk-VR for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 11:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Aug 2023 15:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65516 X-GNU-PR-Package: emacs Original-Received: via spool by 65516-submit@debbugs.gnu.org id=B65516.169332338910913 (code B ref 65516); Tue, 29 Aug 2023 15:37:01 +0000 Original-Received: (at 65516) by debbugs.gnu.org; 29 Aug 2023 15:36:29 +0000 Original-Received: from localhost ([127.0.0.1]:51397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb0lY-0002px-QI for submit@debbugs.gnu.org; Tue, 29 Aug 2023 11:36:29 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb0lW-0002ph-1p for 65516@debbugs.gnu.org; Tue, 29 Aug 2023 11:36:27 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 28C6044308C; Tue, 29 Aug 2023 11:36:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693323371; bh=GHWhAkXlzK3inhO6EHzFEoG9fdR1eAgUDkNxs10V3Lk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ORFuBrYv2iVFGaBSAOfv8fRon0uzmJ6lHSGK5GPEMabX7xJtdfa9VIryx4i7/I5iI 6Qcys97QRLBCHogBB1lY5jWSU1uA1pQNlo24yi+T6X4NJCZahylgtySqSb3b6Ex52n CggzoVGmRQue+IUVaQQ+5BfMI7HzeKGHEocGZTWzm8pVVVnKRxJP2VavD6q+Y9bpL4 FUGA5DtoZGJk1WZxU3UudgRd5UI2lz3xcWEYcf8wos+Z1R/5WJaJoYFISZnzpgbs1v bRtOgu9YOaQNucQNCa3g2ztNCno/wsQsiJ0o2K6rWrmMLmYTPK2FuuJCKCEcITg1+N mLiQ3WJoyJbdQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 97D3144305F; Tue, 29 Aug 2023 11:36:11 -0400 (EDT) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6705612040D; Tue, 29 Aug 2023 11:36:11 -0400 (EDT) In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Tue, 29 Aug 2023 09:07: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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268662 Archived-At: >>> I'd change all these, but I can understand if that's too radical for >>> your taste :-). >> >> In any case, we first have to find another solution to bug#41988. >> I.e. a way to "undo" the effects of `edebug-make-form-wrapper` >> or to change `edebug-make-form-wrapper` so that it matches SPECS >> *first* and only when/if that's done do the rest (so there's no need to >> "undo"). > > Right. > > To summarize: The "culprit" is this commit: Have you confirmed experimentally that this is the culprit for your use case? Do you have a recipe? > + (prog1 (edebug-make-form-wrapper > + cursor > + (edebug-before-offset cursor) > + ;; Find the last offset in the list. > + (let ((offsets (edebug-cursor-offsets cursor))) > + (while (consp offsets) (setq offsets (cdr offsets))) > + offsets) > + specs) > + ;; Stop backtracking here (Bug#41988). > + (setq edebug-gate t))) [...] > Do you think it would be possible to let e-m-f-wrapper just put > something on a new "list of actions to be performed oncee the whole > debug spec has been matched"? I'm thinking of closures as "actions", > here. Maybe, but at the same time, when I read `edebug-make-form-wrapper` I get the impression that it matches `specs` quite early on, before it does much damage to the global state, so I think I'd need to step through the code to better understand what was the problem that the patch intended to fix. Stefan