From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 25 02:28:53 2023 Received: (at submit) by debbugs.gnu.org; 25 Aug 2023 06:28:53 +0000 Received: from localhost ([127.0.0.1]:39024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZQJR-0003JN-6u for submit@debbugs.gnu.org; Fri, 25 Aug 2023 02:28:53 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZQJP-0003J5-6L for submit@debbugs.gnu.org; Fri, 25 Aug 2023 02:28:51 -0400 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 1qZQJ7-0000SK-2i for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 02:28:34 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZQJ4-0002Ae-JK for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 02:28:32 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50078e52537so828670e87.1 for ; Thu, 24 Aug 2023 23:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692944908; x=1693549708; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=XXAami2aMFGeLR1y6v19lLDyZm37ONGC/YibcoG8Lh8=; b=pf6DJzy7aU8rBmtDHn1V7VMiuOU37Sd/mYauCuL5wrS6jelDLVtztX5Rld2M93vtSV +1Sf0bzD+/WR0td/9foYU+JweP6MdeVJm20pjZJwZ0R8G2vGA5j69O6WxuSkp+l02wxp RjyOBoQoDHdOSaP145WuPbw0Ipdy1nYJ+XhJOCmPJMWWTiWOjrdSKX+zqd8bqtImJb5j 7YjN4XmDLuNptNq+tdCdqcJEIUhOgHjZqO058LLr5TYsecHgoHmWBoC0cvo8/s+oWuyR 3cPOJ2+EAdljcK1QwmeTzFVvWAbZceYFlTf2+Rd6/IPb+EELjFpS8PnpPbXNT7GiicRM zWcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692944908; x=1693549708; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XXAami2aMFGeLR1y6v19lLDyZm37ONGC/YibcoG8Lh8=; b=ASlxNzL1iT7XFQE9qtk7wATIbeuK2ogmQ/ORNVSzB/9+c5Gvq9LmePV8FMzCL9WRVS /PZWVq6U/iC93FmZguW0B5AsXezKZjObhEUDQYrq1MRbbV8as2mbaspTHsZpZYF3KzOI DTLqdFqcHvIErVwCg4kjvGWXeCFTUkLfl0O9l89y9O/rp0dpfu0Pgs+ud1dItwVi6yoh yCcloHCWa0F3gG6HgFxabbEoK6rQKk0XnU/ppsva6ACUuqP6KD1jpMZ3GGY/PsKZwaq1 +PrYt17ZYo3jG9N6j9fyuv2XkVxZyEzeUeJQ68gcyOrMAKUgev6IqeaMAfQNtNGbXA2e YLfQ== X-Gm-Message-State: AOJu0Yxap7FCm6nFj214a04nXwBvRIZrFKaX3UrJ2JiEUz5oJn92sVtQ GgHI60nwVmp4GZMaxk4uuHPNAP++/fSmMg== X-Google-Smtp-Source: AGHT+IH8kM0+WHuALPaU52iZH9ZZnQBfxJrr28WtL8CSbvJCYz49My8XFxCMUAx/+Nyx0cDkLgloYQ== X-Received: by 2002:ac2:58d6:0:b0:500:780b:5bdc with SMTP id u22-20020ac258d6000000b00500780b5bdcmr10874895lfo.49.1692944907924; Thu, 24 Aug 2023 23:28:27 -0700 (PDT) Received: from Mini.fritz.box (pd9e36a34.dip0.t-ipconnect.de. [217.227.106.52]) by smtp.gmail.com with ESMTPSA id c11-20020a170906924b00b0099297c99314sm584183ejx.113.2023.08.24.23.28.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 23:28:27 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Edebug behavior of signaling errors in &or Date: Fri, 25 Aug 2023 08:28:26 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is a followup to bug#65344, which see. When Edebug matches a debug spec (&or (... def-form) (...)) and the form matched against is not something def-form matches, an invalid-read-error is signaled, regardless of the context in which def-form appears. That means the second sub-clause of the &or never gets a chance to match. This is not limited to def-form and not limited to &or (think ¬, for example). In GNU Emacs 30.0.50 (build 2, aarch64-apple-darwin22.6.0, NS appkit-2299.70 Version 13.5 (Build 22G74)) of 2023-08-24 built on Mini.fritz.box Repository revision: 53c07bd04bf59f63e49af2c626714bf3fdd03ad6 Repository branch: scratch/pkg Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 26 08:04:37 2023 Received: (at 65516) by debbugs.gnu.org; 26 Aug 2023 12:04:37 +0000 Received: from localhost ([127.0.0.1]:41852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZs1t-000534-8V for submit@debbugs.gnu.org; Sat, 26 Aug 2023 08:04:37 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:45258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZs1r-00052s-QV for 65516@debbugs.gnu.org; Sat, 26 Aug 2023 08:04:36 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-52a40cf952dso2490622a12.2 for <65516@debbugs.gnu.org>; Sat, 26 Aug 2023 05:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693051464; x=1693656264; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gUqfB+GtLML1/GeFrsmSqThrkbhLa+Nm6jIEJNUhi5I=; b=DVonztLJ6x3BSN6PiJuNlKa9Z05HOISY0uZjpSm/WG9tT1xXsTAgnFYM14fURCIQ71 WOk3kp1c5/c0RXXqOiNE0NEyUa5MtbQEOfceEx4hliR1tnI95uIAbN+nVKBHJWGePMhS Kii1lPDQt7yfiuYBfVrVRaUDqIZg5RBzNKXXGALKnLjn8rlUQIBK2OIFUEvKXuMVPqYL blY+SSRKNKYmIHooa3lL+CwH04y0TUENjhPmNbFjfD5EkeV7bpLCh5wuR6vxqagv9mH1 OCNXkkJQKLgaK7u6KqXpeaVZuXESy6BMd3cf47vHSP2IzEZEMjGkOzXczml+JaTb0wEy F1oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693051464; x=1693656264; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gUqfB+GtLML1/GeFrsmSqThrkbhLa+Nm6jIEJNUhi5I=; b=hT//Og5c+aylhtMLJsClJqmCA2TqwoK1jdovw4D33mkpcG7r66536lpvHb7f/hpXns WsMWVhAJVdLYVEUF02e4YoJMWPQ1L7cqYz9c4n2Onw9dkchhKRlTZNDCUSm0qfZHm5qo FMI/eexwtKtZcrY3TOLGuFb7zkhOu0k7CC0xBVV467WtJjs9cw0xqex8QHrpjwMmDI2x 04uddsUsCiGXJFj4LbduWBbFCOAFxW5ml3A6T4AFRFu/VXboTto7Nyt239sqXKS91g1z 1j4qqJeypj4TEigZBwva2V6sTiY57+rA0nXp46mASZkoP9EkiukWXfTSryJmDcnyGMP1 J5Sg== X-Gm-Message-State: AOJu0YwN8fTrTZCvldbokaAEF0PkneyzVwIgly2YWJs77ladhR82EPmm Mk8OOslmRbdDkF22qIHj9wNxgviZqWChyQ== X-Google-Smtp-Source: AGHT+IHpiv8UsU3Iv90EySQ6M6f5EB21ZQjZKbrDvfg2dTAcmG5KwOoOa9MvVnRN4bFdhtkN5hWdXQ== X-Received: by 2002:a17:906:59:b0:9a2:295a:9bc5 with SMTP id 25-20020a170906005900b009a2295a9bc5mr4576427ejg.21.1693051464061; Sat, 26 Aug 2023 05:04:24 -0700 (PDT) Received: from Mini.fritz.box (pd9e36ea3.dip0.t-ipconnect.de. [217.227.110.163]) by smtp.gmail.com with ESMTPSA id ju26-20020a17090798ba00b00982a352f078sm2111367ejc.124.2023.08.26.05.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Aug 2023 05:04:23 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Stefan Monnier Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Fri, 25 Aug 2023 08:28:26 +0200") References: Date: Sat, 26 Aug 2023 14:04:22 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65516 Cc: 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > This is a followup to bug#65344, which see. > > When Edebug matches a debug spec > > (&or (... def-form) > (...)) > > and the form matched against is not something def-form matches, > an invalid-read-error is signaled, regardless of the context in which > def-form appears. That means the second sub-clause of the &or never > gets a chance to match. > > This is not limited to def-form and not limited to &or (think > ¬, for example). > > In GNU Emacs 30.0.50 (build 2, aarch64-apple-darwin22.6.0, NS > appkit-2299.70 Version 13.5 (Build 22G74)) of 2023-08-24 built on > Mini.fritz.box > Repository revision: 53c07bd04bf59f63e49af2c626714bf3fdd03ad6 > Repository branch: scratch/pkg > Windowing system distributor 'Apple', version 10.3.2299 > System Description: macOS 13.5 Hi Stefan, I have a question that I hope you can help me with because you did a lot of improvemnts there. The question is not very important, but it's one of those times when I can't make sense of something, and that starts nagging me a bit :-). My question is about edebug-no-match. Do you perhaps have an idea what the reason might be why it ever chooses to signal an error instead of just throwing no-match? I've looked through the history of edebug.el, to find out what the use-case for signaling is, but that's difficult to follow, and I failed to find the answer. Probably I'm overlooking something obvious, as usual :-). From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 26 16:39:38 2023 Received: (at 65516) by debbugs.gnu.org; 26 Aug 2023 20:39:38 +0000 Received: from localhost ([127.0.0.1]:43530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qa04I-0001t5-37 for submit@debbugs.gnu.org; Sat, 26 Aug 2023 16:39:38 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qa04D-0001sl-Rr for 65516@debbugs.gnu.org; Sat, 26 Aug 2023 16:39:36 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B6D2A1000EF; Sat, 26 Aug 2023 16:39:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693082361; bh=qx+EYvwRmX9K/AvmpPV+ksiYDChD9qcP8FF5OERTsk4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YKKpXNjoJ7lRcUG4jZTvAyXCWx31JBFQJKrgeU/p7H4FvzDPqdJxJPVk+POr/lQpq gL+/QBoKCs68fhZ87VArnbcwv5QvSHyKJRyMkdS2JBwYKnd4to8bMkpeT0Q2fMT/6w HCuImI3XNanoxMuq+sHIfiozZN4+64+Sso6/zgZoKFiUcfximz5+1eeoYgXN0BEgJU uEEuLVkZOkUbWIHP6BE3xCqVYtCoCcUfa5GhX1pdO8+nBIA2PQBF48HJWhd12WAFn+ C2crZrZVZW9vr8VXdxDy+WvXNdbsK1DnKYythIgP5mlSZWKBuL8qVhd3H2LSY6LvL9 kdg78hOPE4jig== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B7FD8100084; Sat, 26 Aug 2023 16:39:21 -0400 (EDT) Received: from alfajor (unknown [72.2.26.42]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 79B0D120247; Sat, 26 Aug 2023 16:39:21 -0400 (EDT) From: Stefan Monnier To: Gerd =?windows-1252?Q?M=F6llmann?= Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: ("Gerd =?windows-1252?Q?M=F6l?= =?windows-1252?Q?lmann=22's?= message of "Sat, 26 Aug 2023 14:04:22 +0200") Message-ID: References: Date: Sat, 26 Aug 2023 16:39:20 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65516 Cc: 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > My question is about edebug-no-match. Do you perhaps have an idea what > the reason might be why it ever chooses to signal an error instead of > just throwing no-match? `edebug-no-match` is the only place where we test `edebug-gate`, so if we make it throw to `no-match` it would make `gate` into a no-op. (`gate` doesn't occur explicitly in your example, but it's implicitly present inside other things like `&define`, and hence `def-form`, IIRC). In a sense `gate` is supposed to be a bit like Prolog's "cut", but Edebug isn't quite like Prolog (e.g. it doesn't really do backtracking; it works more like a PEG parser) and similarly its `gate` isn't the same as "cut". See bug#41988 for a case where we didn't want a failure in one "definition form" to be allowed to continue matching in a second branch of an `&or` (tho this was arguably because some of the code executed along the way had side-effects that can't be undone). :-( Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 27 02:26:53 2023 Received: (at 65516) by debbugs.gnu.org; 27 Aug 2023 06:26:53 +0000 Received: from localhost ([127.0.0.1]:43902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qa9Ea-00067U-M5 for submit@debbugs.gnu.org; Sun, 27 Aug 2023 02:26:52 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:47218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qa9EX-00067F-NT for 65516@debbugs.gnu.org; Sun, 27 Aug 2023 02:26:50 -0400 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2bbbda48904so32791271fa.2 for <65516@debbugs.gnu.org>; Sat, 26 Aug 2023 23:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693117598; x=1693722398; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=mS8fqrVI0yAe+wE/XOKg5UJpCpRn+EnrMa/ea7+hXEQ=; b=PIS+9WfaGK5B10FURQGUyIgktZGkteB71KQhy+Fsc29ToGVdtJfR6sNtR/xycoJSk2 gHBlfax940VsKgbfoav0S9n0fT+nUG8bpHfAijmXZ1b9lh1XjhT9zKCG9jNwXWFK5RXo iPTdVxUop1o6DPRb9IRgN7dmqjX+/DJip/Dtd/Al7DOo30rdBuwMtTqy+P4/K+YMcwcA /YqSPuXTdVZE5a42I78uM0jOggy3MX3uZ0IbnyO1maTYvZApofV1WvIraX7pdxhI2bQq xUBwqNApYBL3MBibuTPxeCO8u1KJmT5RVe45tKQja6UUvNgWNu/i9laTjYC5875KueZ4 GTJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693117598; x=1693722398; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mS8fqrVI0yAe+wE/XOKg5UJpCpRn+EnrMa/ea7+hXEQ=; b=cndMTyI0925lcJZJ7rerdc+V2qS7Ek6jN+Ko74s/v+vZnDDX2GdZCNnxjqata9SBRD KB0skgZSbr/3YbDK1uzzefvQB6drk6J3qIz976IZp2YEyq3Dv1Yrx8Mz1S07Q+oK0RYW YXVuao9nG/ybwfiVBXXeu+ADqqARO25n463FIp+BeaHquFFF7jDzR3cygD0L5EeepQhe pZ7ShUO2GGkzDSqx0qd/070KvWXdocqmizlBbiAyLmCWDfkj/JV39kHUqqVibON1oEU7 nUrmCiXmyoXHZKZhfmANdWQnxK/TZzC0Yv4xwinuR5waMXu6oSArS2p5hFHd+fSzgZDX 47iQ== X-Gm-Message-State: AOJu0YzoZu01vvq9geTUkp89LraqReBxSDniCGtasRSl7yByYP8wEHis bb9QD6WO18QpLntJFIMsFMU= X-Google-Smtp-Source: AGHT+IHizieJcJ7A4DrEtmr1p0VcG3alANV+Fr/XIm75LjQ5lSrJ2FJKwFBZKp8SqUJWYmpSff9kGw== X-Received: by 2002:a05:6512:ad2:b0:4fe:4f8:8e75 with SMTP id n18-20020a0565120ad200b004fe04f88e75mr18575380lfu.68.1693117597717; Sat, 26 Aug 2023 23:26:37 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a918.dip0.t-ipconnect.de. [79.227.169.24]) by smtp.gmail.com with ESMTPSA id b14-20020a05640202ce00b00522572f323dsm2964186edx.16.2023.08.26.23.26.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Aug 2023 23:26:36 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Stefan Monnier Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: (Stefan Monnier's message of "Sat, 26 Aug 2023 16:39:20 -0400") References: Date: Sun, 27 Aug 2023 08:26:36 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: (Adding Michael in CC because he might be interested.) >> My question is about edebug-no-match. Do you perhaps have an idea what >> the reason might be why it ever chooses to signal an error instead of >> just throwing no-match? > > `edebug-no-match` is the only place where we test `edebug-gate`, so if > we make it throw to `no-match` it would make `gate` into a no-op. Yes. > (`gate` doesn't occur explicitly in your example, but it's implicitly > present inside other things like `&define`, and hence `def-form`, > IIRC). Correct. > In a sense `gate` is supposed to be a bit like Prolog's "cut", but > Edebug isn't quite like Prolog (e.g. it doesn't really do backtracking; > it works more like a PEG parser) and similarly its `gate` isn't the same > as "cut". Right. > See bug#41988 for a case where we didn't want a failure in one > "definition form" to be allowed to continue matching in a second branch > of an `&or` (tho this was arguably because some of the code executed > along the way had side-effects that can't be undone). Hurrah! :-) Yes, that's it! Thank you so much, that made my day! As a fix, I'd like to propose to remove 'gate' as a debug spec entirely. Reasons are: - I doubt it's very useful to signal invalid-read-error while matching. In fact, I found it very confusing, when I got it, wondering how the Lisp reader comes into play here. And the signal didn't give me any helpful info either. - I can't imagine anyone using 'gate' as it is. I just don't see a use-case for it. I know that could be considered radical. But, so what? WDYT? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 27 11:30:29 2023 Received: (at 65516) by debbugs.gnu.org; 27 Aug 2023 15:30:29 +0000 Received: from localhost ([127.0.0.1]:45985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaHif-0006WO-Da for submit@debbugs.gnu.org; Sun, 27 Aug 2023 11:30:29 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaHia-0006W8-NV for 65516@debbugs.gnu.org; Sun, 27 Aug 2023 11:30:28 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 094428076B; Sun, 27 Aug 2023 11:30:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693150211; bh=WTuiZu02XkRZhgzAX0joqGt92Qw0ecylpgIPzyhzJm0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HYSrsBC/Hk4TFKblF5GmDSRpIZiuj3B67/rjIWmzEV31EGrEml+QwQry3FCs5fwA1 slS4A84LHzRN1KolXcXRC069SADPa+UAu9klIBHVOZiIE3o9VNU6Hm6t428zy9dJJI WfTlVODwUP+tXByIX8+eh2bxHbf/E8KLxTI21ABX6RwkhtVy6bKGIcNOcWVlDF9oh5 G1Ck3Lrh+WkpkdWis/SeQ3NjhCLfoCHmIhztNKHF7cahsZe49jPbwSmALyLLv2k8sa QTGUnV9hyfLQOxqAX7zh3SPCw//QAx3+flz18egNnUbRuCO0tO9aPseJPV57H4FEYe jE01wGxxLd/ag== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CF06E8019D; Sun, 27 Aug 2023 11:30:11 -0400 (EDT) Received: from pastel (unknown [108.175.234.188]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A0D3E120323; Sun, 27 Aug 2023 11:30:11 -0400 (EDT) From: Stefan Monnier To: Gerd =?windows-1252?Q?M=F6llmann?= Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: ("Gerd =?windows-1252?Q?M=F6l?= =?windows-1252?Q?lmann=22's?= message of "Sun, 27 Aug 2023 08:26:36 +0200") Message-ID: References: Date: Sun, 27 Aug 2023 11:30:11 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> See bug#41988 for a case where we didn't want a failure in one >> "definition form" to be allowed to continue matching in a second branch >> of an `&or` (tho this was arguably because some of the code executed >> along the way had side-effects that can't be undone). > > Hurrah! :-) Yes, that's it! Thank you so much, that made my day! > > As a fix, I'd like to propose to remove 'gate' as a debug spec entirely. It's worth a try but: - We should come up with a better fix for bug#41988/bug#41853 first. - We need to check the impact on current users of that gate mechanism. For the second, `grep -C9 debug **/*.el | grep '\'` finds only one direct user of `gate` inside Emacs or (Non)GNU ELPA, i.e. `cl-macs.el` lisp/emacs-lisp/cl-macs.el:1224:;; '(&or (loop-var . [&or nil loop-var]) [gate symbolp])) lisp/emacs-lisp/cl-macs.el:2858: (gate gv-place &optional form)]) lisp/emacs-lisp/cl-macs.el:2989: (gate ;; FIXME: Why? but there might be users elsewhere. And more importantly it's used within - strings - `&define` - quoted symbols? The last one seems to be an old deprecated mechanism (a comment suggests it should be replaced by a string) that just has never been actively deprecated, so maybe we can disregard it. But the first two are used in a lot of places, so it might be more problematic. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 27 11:32:41 2023 Received: (at 65516) by debbugs.gnu.org; 27 Aug 2023 15:32:41 +0000 Received: from localhost ([127.0.0.1]:45990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaHkm-0006ZZ-Vz for submit@debbugs.gnu.org; Sun, 27 Aug 2023 11:32:41 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaHkk-0006ZJ-EL for 65516@debbugs.gnu.org; Sun, 27 Aug 2023 11:32:39 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 18464441663; Sun, 27 Aug 2023 11:32:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693150345; bh=jS66V/OrKKAAMHsDj8zlLit552i3dJjZQZyWzaTNnlQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DKrKgp4UJFDFsvI75mOFBRBffLCskb2Ua/lu7W1WJ58yPg6SKyXitKvOSCoB+va7Z lJC5YWuDN3DvIRfw39QjpsIMB4ZhokwUuFITCpebAGvGIuJeJlGIdZT1uyw9T5XcSC nYb9x4emDyQ+x9ezZlhaKVKSkCURH8tHRZnX27MPZFaZCHkYx2CLM2mOXBpwiv3Ahd 6zwGDfdZdgOTI0bWOBKjzzTP7fKUJqimEjyJSotBQBZ4tKqww4OEX6GZktqPAL8dew 5EOdmBENM2YtBP53m2VTlmdHKup14vyqLsgROK2D4cwBxRn7P+Dx+kjDtNw+s55Tvj btOqEmkJrOuZQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E3B3944165C; Sun, 27 Aug 2023 11:32:25 -0400 (EDT) Received: from pastel (unknown [108.175.234.188]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AC83C120193; Sun, 27 Aug 2023 11:32:25 -0400 (EDT) From: Stefan Monnier To: Gerd =?windows-1252?Q?M=F6llmann?= Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: ("Gerd =?windows-1252?Q?M=F6l?= =?windows-1252?Q?lmann=22's?= message of "Sun, 27 Aug 2023 08:26:36 +0200") Message-ID: References: Date: Sun, 27 Aug 2023 11:32:24 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.046 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> (`gate` doesn't occur explicitly in your example, but it's implicitly >> present inside other things like `&define`, and hence `def-form`, >> IIRC). > Correct. Hmm... actually, looking at `def-form` again it seems it doesn't use `&define` nor `(edebug-)gate`. Now I'm confused. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 27 18:58:55 2023 Received: (at 65516) by debbugs.gnu.org; 27 Aug 2023 22:58:55 +0000 Received: from localhost ([127.0.0.1]:46408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaOid-0002Id-3U for submit@debbugs.gnu.org; Sun, 27 Aug 2023 18:58:55 -0400 Received: from mout.web.de ([217.72.192.78]:36001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaOiX-0002IL-HZ for 65516@debbugs.gnu.org; Sun, 27 Aug 2023 18:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1693177113; x=1693781913; i=michael_heerdegen@web.de; bh=nbfoJ7R3yOTWsExHfAhk4TALtUpxh4aGMQ/a2fMTf3w=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=CfTKyjhHoMoAI1pdDP66QqDzZF1J6md1hVY8x9doGK0UJpJ4O8+D0m9JfHQUMEpjMPorClN Gqbrnfy5Pt7K9N8rkkoGuG/2tsxj4JHSxBv/ICFn+XIXhsp+91dk9Ig2eKiVOdKOQC8JAwcTU 8yAzzA7gh0h39r9vQ4Bk+xHQbRw1Ylh+medLaC8stuPO9IM8it6TVBg3VZQC5zdWaxalUhReN 8lVb8lYKxVODz536Gh21jUK+TOPvicqWsJnA8YSSsWwwCsdVjE1uk3rdpzwXf5ssfHlskWhiv ++YHcDWQWXqq6HA9dPLpDM55hpqFxgZ8bbbHtZMT3hxKb5r2L4QQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([84.60.174.218]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N1LsH-1pXcDi0hLf-012nbi; Mon, 28 Aug 2023 00:58:33 +0200 From: Michael Heerdegen To: Stefan Monnier Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: (Stefan Monnier's message of "Sun, 27 Aug 2023 11:32:24 -0400") References: Date: Mon, 28 Aug 2023 00:58:31 +0200 Message-ID: <878r9w8548.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:+okuZKsMboYF0l1msZjvPnNycbXqhxz1kdY3qdX4kdd8XJieyRI 4vdjizegUUwfaHijp9ttsdufXkDIKVF5D22kLF/EahGqGjMDj7+dVzSt9zUB2IJzghFiurm /YyNdz8emxjJapT97qkSqmqHba+UtvjAxo25remJQxlvOiJUNbPi959GUINHjG/nyJeW5GX UBbqB7ek69zeHetVmdjdw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:hn20CqWFwr8=;Lum3ZiI6vpaWKxs1U1+dHP90SXn Js78EH9BvqAbFOoQYHwa7EaKY58zvT3GJMGgcp547rYmzie1xTOK36FeBs+UMSkOdSGwZa9iu jpZicYamxjKjiO7J5IXMGrNcEmCUbugVkwBkzVzo37xqHQ2eYNqK3UufRPbTdZpP2kIIE2joW sM9vwOOA5op+5oaRfsalWDXUEbYyvd3qFfzOrdzGuES1TUY2YMNh5ON3taZGRiZCcynEipWwj C11DLSv/nOlj+5pwQ+cjq/uF70vi9RIetOOdwizzsWVLcVvBd3IvgV7VJlsl170ay1o69vLCs 8aZ2E6HOspWqNT2wKJV/cPgUwteLddvTzMg83tH954lyF0qTitgZrbTjZxGbwcq8+6KYkCkLZ TylfS4dnu+M2oLH3YcbEA3lMyFDBn6fsgWD1S6PXJXC8fIdyuousEzW5lKKkXX4TGTerJ0CtD TG+fIjzk9A45u3jW1nYohrk8zHzpukUD1jFcFiAJgNsFvFBNjakRda58c/T5g7RuiCZ5ksDjX YlBNA8HzcduZVjo5RtYtEOS9ocYC6bXGMgCYbGabuOlxIN/aZEZos6nfCfd0+bHkACXZIn9eB mNFc1P1p/hPu3uL6ZEbUPVFdFFBxvbvleyrAE24CPzGG2GMpMrD14Lrzu+sQ86kSlNa/ujMqt +ODKyBYO8ey/+gkTIpp3SWZE5N0HCIwOzyMyxfuB+tL3CspaOVzM/3uCpw5HWdaEhzuV05kfl FPIHl97kiSddsld+3Nlc7k3QFmnix3pItHkEXNAmGsWUzm++W8wnpJiLu9geAwpFVxjpLjiPD h688LpcgZfwjSQK5Eww0bCwpyHS+fkwOR667lrSc18iQZ5aDsnEcAnUj3NOFJFwgsTTIwgZTQ 5NpUlj0lkE7/0n70l1/u9wIa5VC/APAA7CFYXxBlO9H2pQN+thCa4EkW0rqGyKsSsvfyaaIhc 1+JF43gjw3diGNVCS+jzbbMda4k= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 65516 Cc: Gerd =?utf-8?Q?M=C3=B6llmann?= , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Stefan Monnier writes: > Hmm... actually, looking at `def-form` again it seems it doesn't use > `&define` nor `(edebug-)gate`. Dunno if this helps, I'm understanding it only half, but AFAIU, `def-form` falls back to `edebug-form' which looks at &define and uses `edebug-gate' indirectly when calling `edebug-list-form'. Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 27 23:26:51 2023 Received: (at 65516) by debbugs.gnu.org; 28 Aug 2023 03:26:51 +0000 Received: from localhost ([127.0.0.1]:46579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaStu-0000Yz-Tr for submit@debbugs.gnu.org; Sun, 27 Aug 2023 23:26:51 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaSts-0000Yk-DJ for 65516@debbugs.gnu.org; Sun, 27 Aug 2023 23:26:49 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 56FFF100084; Sun, 27 Aug 2023 23:26:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693193195; bh=diTiQknlBxTZ2KAnuMB/ewKxVnrQHBdBuEBFzRBd6GY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DOPHpIHXW4QyVEgHZQHjU04s5uG9Ub5ZuBlSwqt5kHzjNlNNfD4Kr0bJXjEZHHJfB 9hYBisI9o/UDbYcF+fJsFL6nmjIQ+OHn1o2jBYUiKsz6RnQHIhdoBWW5qLuSmRvct7 z4i/TF+BBNOK1DGQai0JDMr/nR0QFdnUB7Kd0piqVZpS02HcIEbgsfR8+u0rEOucnR WIFQQXRZMnw7anZ7ivtxym4UPlwvR2P7FHVO86u8Os7qZ6D/mXhaBjnglHlaoPXFWT MQnza8Wj6PZWd808BMc2Cv9WyBE2ZmfnbPlFaieDgn4olmuSFJSWWS8SU4157UBlBN /L17EFW8vqoow== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 10C2B100064; Sun, 27 Aug 2023 23:26:35 -0400 (EDT) Received: from pastel (unknown [108.175.234.188]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D415C1200D7; Sun, 27 Aug 2023 23:26:34 -0400 (EDT) From: Stefan Monnier To: Michael Heerdegen Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: <878r9w8548.fsf@web.de> (Michael Heerdegen's message of "Mon, 28 Aug 2023 00:58:31 +0200") Message-ID: References: <878r9w8548.fsf@web.de> Date: Sun, 27 Aug 2023 23:26:34 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.058 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65516 Cc: Gerd =?windows-1252?Q?M=F6llmann?= , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Michael Heerdegen [2023-08-28 00:58:31] wrote: > Stefan Monnier writes: >> Hmm... actually, looking at `def-form` again it seems it doesn't use >> `&define` nor `(edebug-)gate`. > Dunno if this helps, I'm understanding it only half, but AFAIU, > `def-form` falls back to `edebug-form' which looks at &define and uses > `edebug-gate' indirectly when calling `edebug-list-form'. Hmm... Could be, indeed. In any case, this "gate" business is quite messy. I'd be tempted to start removing uses of it, bit by bit, to try and see what breaks. And if needed, maybe add a new replacement for it that would be better defined (I'm imagining a kind of "scoped gate", which could look like `[&gate-in ... [&gate-lock ...SPECS...] ...]` such that if `...SPECS...` fails to match, we propagate this failure immediately up to the `gate-in`). This way [&gate-in [&or ["foo" &gate-lock ...] ["foo" "bar"]]] would never fallback to ["foo" "bar"] whereas [&or [&gate-in ["foo" &gate-lock ...]] ["foo" "bar"]]] would fallback to ["foo" "bar"] if "..." fails to match. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 28 01:44:36 2023 Received: (at 65516) by debbugs.gnu.org; 28 Aug 2023 05:44:36 +0000 Received: from localhost ([127.0.0.1]:46727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaV3E-00075w-4F for submit@debbugs.gnu.org; Mon, 28 Aug 2023 01:44:36 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:49656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaV38-00075f-HD for 65516@debbugs.gnu.org; Mon, 28 Aug 2023 01:44:34 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-99cce6f7de2so353478766b.3 for <65516@debbugs.gnu.org>; Sun, 27 Aug 2023 22:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693201458; x=1693806258; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=4ZlpHEugcX2IlfAaNROIpHzHGoaZWqJceQA0jLkUe40=; b=q8yUJRKyH+IhboRABvGnU4da57mT5FKeWNK69B0NyccLhPE3+D83/bVMZcHQMO3M8d NjOA+HaEHGEg+jBtqGOwwNhCq2buug7pxacMjZmb/cIxeQRLClqHz+IBC1d7YOq+pAjS k0eSmzNm6XfApnTD9/tzNyEIsJgeyHbM18M4Vq7j2iHtFKD6YV3+v14oyj/fpvdt/a9w mftcGEnSo1uLwdAYrvkDnIuJQIeYLqMWNvqxNlY8jiWm+RNC+GFdyzWR1nnTpY1QHCd2 LyaQbI7FwziFz6mbkG38aJdkZZz/MIyImweiscfWVMwyn6PhO7SXJyCVP++1Njku6KsB eVKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693201458; x=1693806258; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4ZlpHEugcX2IlfAaNROIpHzHGoaZWqJceQA0jLkUe40=; b=X8Q5sTGTT/H/E85O6RV9N6CwtK/QxQmJ0zWoAj2mSZsMAl6NM06CqrXAR0kziFPQUM rmOzZAqwSrjO0pkzm74Oc6GGoOvxiPPVAPYdnkn8h/4Y+XuD5ZmvGSBHJ2Ze4q7BNRkp tmZwvhyTJFCRH529b6LISamx3HtyaclJSJkyXSJn3ei7ct2JsvQm+Ow7nh/2dXHnP99D 3fcJHyWlP/+DzldJRA+dIT5VSbodNttuYz95sUfve3eaeM72o08w3LCtJbdODWKVgeSq 6vjH+AiuhO7hiH+NCd5ye+6G8pcrEapD8DcXswTkqyfQO/3phsiXZnMIHmEgSlQqJcyN kmJw== X-Gm-Message-State: AOJu0YzVUd4NS0bV550hsSRfMdfqIxuX40bkaE4e+0Hxv53zTZJHUfLc ag72rYTmecbGXhUeqNxgQyg= X-Google-Smtp-Source: AGHT+IECck3Vtv7ekG35k1RjKkC6FzCiVPDPsfqUBGPqGno0GXIkii8U/q8X24FTS8O1pqEgkE+91A== X-Received: by 2002:a17:906:53d6:b0:9a5:81cf:57bb with SMTP id p22-20020a17090653d600b009a581cf57bbmr5801103ejo.41.1693201458006; Sun, 27 Aug 2023 22:44:18 -0700 (PDT) Received: from Mini.fritz.box (pd9e36867.dip0.t-ipconnect.de. [217.227.104.103]) by smtp.gmail.com with ESMTPSA id bn24-20020a170906c0d800b00997d7aa59fasm4308470ejb.14.2023.08.27.22.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Aug 2023 22:44:17 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Stefan Monnier Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: (Stefan Monnier's message of "Sun, 27 Aug 2023 11:30:11 -0400") References: Date: Mon, 28 Aug 2023 07:44:16 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >>> See bug#41988 for a case where we didn't want a failure in one >>> "definition form" to be allowed to continue matching in a second branch >>> of an `&or` (tho this was arguably because some of the code executed >>> along the way had side-effects that can't be undone). >> >> Hurrah! :-) Yes, that's it! Thank you so much, that made my day! >> >> As a fix, I'd like to propose to remove 'gate' as a debug spec entirely. > > It's worth a try but: > > - We should come up with a better fix for bug#41988/bug#41853 first. > - We need to check the impact on current users of that gate mechanism. > > For the second, `grep -C9 debug **/*.el | grep '\'` > finds only one direct user of `gate` inside Emacs or (Non)GNU ELPA, > i.e. `cl-macs.el` > > lisp/emacs-lisp/cl-macs.el:1224:;; '(&or (loop-var . [&or nil loop-var]) [gate symbolp])) > lisp/emacs-lisp/cl-macs.el:2858: (gate gv-place &optional form)]) > lisp/emacs-lisp/cl-macs.el:2989: (gate ;; FIXME: Why? > > but there might be users elsewhere. And more importantly it's used > within > > - strings > - `&define` > - quoted symbols? > > The last one seems to be an old deprecated mechanism (a comment suggests > it should be replaced by a string) that just has never been actively > deprecated, so maybe we can disregard it. > But the first two are used in a lot of places, so it might be more problematic. I'd change all these, but I can understand if that's too radical for your taste :-). From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 28 01:45:07 2023 Received: (at 65516) by debbugs.gnu.org; 28 Aug 2023 05:45:07 +0000 Received: from localhost ([127.0.0.1]:46731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaV3j-00077O-HP for submit@debbugs.gnu.org; Mon, 28 Aug 2023 01:45:07 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:42490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaV3e-00076R-Lh for 65516@debbugs.gnu.org; Mon, 28 Aug 2023 01:45:06 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-99c93638322so587168866b.1 for <65516@debbugs.gnu.org>; Sun, 27 Aug 2023 22:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693201490; x=1693806290; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=fW96t/ajRoYJ+xNII/G1Snzs0xn9l02rgkh92hWEAKU=; b=QJHzVZcRPQe2io2v9AkrO3SuDwLdmomTjfEmtXq81cZvYXln+7LP0qPYJ+pvC8Ceub qExUeCp1E/y+K5MrwCgsvkwIEjEPcQTS2jYtFgJyRjDeh6s2tJje3TrFWw5mIOLMWHql ojySlTzeAj9mkpgCSMp/6Ts8pvMT3l5n+Y/pvj4e9hZUAT9Fcx/YSv65rBdNLGJJKQeJ HNC6Y4O+VkOoIGPq3W1U6lNuDPHXgffS/Cyzipboe54Gefp9vA37tYGE2eeKliQTcq+Q dsnfM3ngC4A0mxRdyD0Mi1ABsWk2SvSHlPOM2T0nBEQQpvojO3esg80kAK1s4RThU4uC +U8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693201490; x=1693806290; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fW96t/ajRoYJ+xNII/G1Snzs0xn9l02rgkh92hWEAKU=; b=UgF0Nx+O/TtKOdx/Ofj+ykyyZJZKyWHPv6adyoLmmdQuL8mgJtBynacJPiCm0jSk7H RPMjmMG2Lj+VQWpZ7NDl+LtBT5MOPzVAT5OZ+r1mvvyJZRobGRt3D6pM0e/K9+CnH97l K+JRDvOizzgqJZvP8ts68fsSlFZz4whr/yp9fPBKAr0XJDObvksqQ/Hp+4MgchP3lc8B ypwG8bZAQ7OOVdmmh1KjzkJzjrOKgRt51sTl/MqOT2WOt98q+7eqdPhBmx/9knJf9u01 Vev7kBVAzut8F8nC0pZi0v55JUXkChsp3Nc413g3jq05RUparSyqu8R8rI7Eks7QUk37 lhWQ== X-Gm-Message-State: AOJu0YxqoMbX83ZB65vc+iKmMFwIrACdDSZ2vS7HpSsjzYyy1oYOaKZE 5WZUzUU4DHOy8s2CSwOyj27GvzNTPW9TcfGF X-Google-Smtp-Source: AGHT+IGUNVe4bLZuL/fn5JFJht8Eo/IdWlnIuIFJQLIialWmiN+7mhVnYHAHHLCIJNqq9Onu9PyRIg== X-Received: by 2002:a17:907:a063:b0:9a1:eb4f:56f with SMTP id ia3-20020a170907a06300b009a1eb4f056fmr13696167ejc.13.1693201490264; Sun, 27 Aug 2023 22:44:50 -0700 (PDT) Received: from Mini.fritz.box (pd9e36867.dip0.t-ipconnect.de. [217.227.104.103]) by smtp.gmail.com with ESMTPSA id ha19-20020a170906a89300b00989027eb30asm4188061ejb.158.2023.08.27.22.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Aug 2023 22:44:49 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Michael Heerdegen Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: <878r9w8548.fsf@web.de> (Michael Heerdegen's message of "Mon, 28 Aug 2023 00:58:31 +0200") References: <878r9w8548.fsf@web.de> Date: Mon, 28 Aug 2023 07:44:49 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65516 Cc: 65516@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Heerdegen writes: > Stefan Monnier writes: > >> Hmm... actually, looking at `def-form` again it seems it doesn't use >> `&define` nor `(edebug-)gate`. > > Dunno if this helps, I'm understanding it only half, but AFAIU, > `def-form` falls back to `edebug-form' which looks at &define and uses > `edebug-gate' indirectly when calling `edebug-list-form'. I think that's correct. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 28 01:52:29 2023 Received: (at 65516) by debbugs.gnu.org; 28 Aug 2023 05:52:29 +0000 Received: from localhost ([127.0.0.1]:46735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaVAr-0007Mf-Ez for submit@debbugs.gnu.org; Mon, 28 Aug 2023 01:52:29 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:50359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaVAp-0007MT-Hm for 65516@debbugs.gnu.org; Mon, 28 Aug 2023 01:52:28 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2bcc14ea414so42568091fa.0 for <65516@debbugs.gnu.org>; Sun, 27 Aug 2023 22:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693201935; x=1693806735; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=YqWHad/XeZfl73DaUOIKh+MSM/CNXqchTNsej1coJoc=; b=hPwkFCPiE3JqEhv/miFyQ6eBDDGdr2+yAcZ094VIKvnjkmsagFLvE74LmiBdZqB6bJ VXC3AcJSK2+923b9rn43e/uIfiRLzOlr4O0PG2vHHIpS+fMb9IrNisn/JBppzcyG5xZo aPbbTu1vyFbiiNfwFpMSdsaIaI4ZnFhdvuGVieJ0AQPoeATWkV28YSAtL6u07YLekXDH V2fZif4oHXYjMjjTxCmehJaZ2xnR8QXO4LsA9FjOH1lNF4V47aow3M5e85F4ewtc2EuN GVz2mMe4c8i53T72rpINKJUkOwqQFkQ2DHKTieH/lmfs/YivLZWiw0C816Vi6SAIQCOy NC6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693201935; x=1693806735; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YqWHad/XeZfl73DaUOIKh+MSM/CNXqchTNsej1coJoc=; b=bhrEMiqNKsHQ8Aqgzbb7zJDYHrgKAvngw0Xmx8CwSZhT/RNo8BhjQqCmCZ1IxmCqjG ijlFSDBW5Au9mYJQGEOsJCKtx0cCd0LqOlucRH9dALXZJA7Alx9/NApOflj2wtsw4R8L WzHW/kYDgh4bDpRCWgG9hIcn0Kk1C2S6At13adq31cgd4G6Rzii2lOKKOP6JBx+jj0Go y9bkuqbT9m70zUAoVRgnONnUxxpeUKvU1YwKpONKXcFXy0Ym2ujxJIyE0jMZFbApDr7B 5z/e4QHzP5K4pcNnvgnljDjB7hiO1onUvbOoq2Xj3/P5FZQAE+NuRGhsnjiZhA/PaR/x 3r9A== X-Gm-Message-State: AOJu0YyzK4UfDdSicjnCwwbTkOl6AtQYOiF5NwkJ9xLPnHf1NSGhgm4g mWIdYnidEH+OlODys4yAe4eiGPN2FJQ3fDYS X-Google-Smtp-Source: AGHT+IFnxcLrJds5Ck2cnR4yKclibiE3fUiTf1GsH88pxU19WVXc2q03dRrQvoCRqdOsW4V1GGdEzw== X-Received: by 2002:a2e:b786:0:b0:2bb:a123:2db7 with SMTP id n6-20020a2eb786000000b002bba1232db7mr17546448ljo.51.1693201934703; Sun, 27 Aug 2023 22:52:14 -0700 (PDT) Received: from Mini.fritz.box (pd9e36867.dip0.t-ipconnect.de. [217.227.104.103]) by smtp.gmail.com with ESMTPSA id gy25-20020a170906f25900b00985ed2f1584sm4243086ejb.187.2023.08.27.22.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Aug 2023 22:52:14 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Stefan Monnier Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: (Stefan Monnier's message of "Sun, 27 Aug 2023 23:26:34 -0400") References: <878r9w8548.fsf@web.de> Date: Mon, 28 Aug 2023 07:52:13 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: > Michael Heerdegen [2023-08-28 00:58:31] wrote: >> Stefan Monnier writes: >>> Hmm... actually, looking at `def-form` again it seems it doesn't use >>> `&define` nor `(edebug-)gate`. >> Dunno if this helps, I'm understanding it only half, but AFAIU, >> `def-form` falls back to `edebug-form' which looks at &define and uses >> `edebug-gate' indirectly when calling `edebug-list-form'. > > Hmm... Could be, indeed. In any case, this "gate" business is > quite messy. Yup :-) > > I'd be tempted to start removing uses of it, bit by bit, to try and see > what breaks. And if needed, maybe add a new replacement for it that > would be better defined (I'm imagining a kind of "scoped gate", which > could look like `[&gate-in ... [&gate-lock ...SPECS...] ...]` such > that if `...SPECS...` fails to match, we propagate this failure > immediately up to the `gate-in`). > > This way > > [&gate-in [&or ["foo" &gate-lock ...] > ["foo" "bar"]]] > > would never fallback to ["foo" "bar"] whereas > > [&or [&gate-in ["foo" &gate-lock ...]] > ["foo" "bar"]]] > > would fallback to ["foo" "bar"] if "..." fails to match. That's a possibility. I can't say much more because I fail to understand the motivation why gate is used in the first place. What did the developers using it want to achieve? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 28 08:42:17 2023 Received: (at 65516) by debbugs.gnu.org; 28 Aug 2023 12:42:17 +0000 Received: from localhost ([127.0.0.1]:47334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qabZR-0003x1-LI for submit@debbugs.gnu.org; Mon, 28 Aug 2023 08:42:17 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qabZP-0003wl-Jz for 65516@debbugs.gnu.org; Mon, 28 Aug 2023 08:42:16 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 620948019D; Mon, 28 Aug 2023 08:42:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1693226522; bh=b2O9aRi9gXxpT15/jlKnJdfpX+0dKG1ti7KWAj1fYik=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dJaFsGjnccKo8PK18BM5x+I4UH27ua3BCFZXiaHOYKk1EYEtgznTQdgkCzrca9q2m ofSaNqgCvYvMljLpgBDGDdaIDeVJ3Khwebdeevq0YOAyeevSeD023u2JINV1swN6rZ zk+0HtmoKMQJqMz49fKfI4SumoR+IqhDwEQSwjx8uJc0AXx0DEAaQw3NHobGSgimGb oTSO/hSP7xEexfhRBDdEUQOWmvizBBSZ3h8AgVDUOTesEXgPbi6n5HndGCSHLMsaYs n/ltDzH6fVFIMKFz10bTiZA2MWlqi89I/b1j0V++/8jGwB4M1SDyvLMjBV7ofgomBB v83H2WVh8+J1A== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 35B6F8072D; Mon, 28 Aug 2023 08:42:02 -0400 (EDT) Received: from pastel (unknown [108.175.234.188]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0FCC912022D; Mon, 28 Aug 2023 08:42:02 -0400 (EDT) From: Stefan Monnier To: Gerd =?windows-1252?Q?M=F6llmann?= Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: ("Gerd =?windows-1252?Q?M=F6l?= =?windows-1252?Q?lmann=22's?= message of "Mon, 28 Aug 2023 07:44:16 +0200") Message-ID: References: Date: Mon, 28 Aug 2023 08:42:01 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.029 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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"). Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 29 03:07:42 2023 Received: (at 65516) by debbugs.gnu.org; 29 Aug 2023 07:07:42 +0000 Received: from localhost ([127.0.0.1]:49404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaspC-0002xB-BE for submit@debbugs.gnu.org; Tue, 29 Aug 2023 03:07:42 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:62661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaspA-0002wx-3h for 65516@debbugs.gnu.org; Tue, 29 Aug 2023 03:07:41 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-51a52a7d859so10273543a12.0 for <65516@debbugs.gnu.org>; Tue, 29 Aug 2023 00:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693292847; x=1693897647; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=sPsi2FDUqZ+3ZfULaSw2l59/QkUlhktzrddejRJTy5M=; b=JPODr1BH5ra/JwVftmWk3gYNyoJOU9/otR6VaButY3jroHNzu9JCqqTu+FM6IeclLZ Vsfk5z+bYcFBDSVOdC+18YU/cFx8lUCqX/amdWV01oQNgkhy8XKnfEkmyLVAf9OvO8SC wQQDE5buZTx0exBvNpuOFRTagDO4blSYzrWnwDHbo6vZpnmYLa+iHt/QzY1Fg5BL4H+D UoeajKYjmhe+Ub/CkSGSMhNDvYwMtbM8sfuZvvhblro7RJ9R5f9BcB9f5iJ0Vrvm/bUH ZSs3kofCadDFKscNmwfhmNZfl9evW7nTdu38jf5bWvwWwPUQBVIEwFNn5Ya6CJnRt3YF +k4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693292847; x=1693897647; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sPsi2FDUqZ+3ZfULaSw2l59/QkUlhktzrddejRJTy5M=; b=SSjzBY/o4Zx69BAjR+6TBDC79RP3MmjvtnVkvoSf6OcChpC8/jEAFinfO69VDXr5/P 7wRbb6PyoInAKdz4ulUglvvC0ujeyZaE7HXI1hAStlZ0KLzru9khNoUd133lBJTFhkbC TpTYmenkr7NV/6uJKFCX89qQCFQm3TDwh/gdEIB2e1PW0iRiUDiw/Cco97ffuql6EBTW /whJbTsc33Gy/8jfOHOJz+alc49dKANkujbrZyIMJgJV8g2ZgchSVm5cfmLPfJqZeQ1l BToiSBankJOpBBe+RQ7raITUk3h2RIDoX0XJDOoQRLS8RHA7FG209GyfQ5Jp4wMB7RST MnnQ== X-Gm-Message-State: AOJu0YwwC8sfuJdHsS0W74jOduZXoGOxduve3SzucHcnI1G+Wau1Hs3j PIiSnUWpPv8hkxxtzxTscHw= X-Google-Smtp-Source: AGHT+IGAxeM+pizNygAedINz9ZvK7Q8h3j+/5GPSK5vtfCTGaHK8e823bQC0AC8Rko4BrEmYRNoiOw== X-Received: by 2002:a17:907:3f9a:b0:9a5:794f:f3c5 with SMTP id hr26-20020a1709073f9a00b009a5794ff3c5mr2034110ejc.6.1693292847140; Tue, 29 Aug 2023 00:07:27 -0700 (PDT) Received: from Mini.fritz.box (p4fe3a8d7.dip0.t-ipconnect.de. [79.227.168.215]) by smtp.gmail.com with ESMTPSA id k8-20020a05640212c800b0052a3b212157sm5274525edx.63.2023.08.29.00.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 00:07:26 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Stefan Monnier Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: (Stefan Monnier's message of "Mon, 28 Aug 2023 08:42:01 -0400") References: Date: Tue, 29 Aug 2023 09:07:25 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> 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: commit 53dfd85a7f971875e716a55f010ee508bce89eed Author: Philipp Stephani Date: Thu Mar 18 12:40:08 2021 +0100 Edebug: Disable backtracking when hitting a &define keyword. Edebug doesn't deal well with backtracking out of definitions, see Bug#41988. Rather than trying to support this rare situation (e.g. by implementing a multipass parser), prevent it by adding an implicit gate. * lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Disable backtracking when hitting a &define keyword. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-duplicate-&define): New unit test. (edebug-tests--duplicate-&define): New helper macro. * doc/lispref/edebug.texi (Backtracking): Mention &define in the list of constructs that disable backtracking. * etc/NEWS: Document new behavior. This commit causes &define to signal if it doesn't match: --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1942,14 +1942,16 @@ edebug--match-&-spec-op ;; Normally, &define is interpreted specially other places. ;; This should only be called inside of a spec list to match the remainder ;; of the current list. e.g. ("lambda" &define args def-body) - (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)) + (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))) The reason for making it signal is that e-m-f-wrapper doesn't take into account that matching might fail, and instead modifies global state. For example, it changes symbol properties. (Maybe also other global state, I haven't checked.) 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. That would be the first thing coming to my mind. I'd find that easier to follow than an undo. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 29 11:36:29 2023 Received: (at 65516) by debbugs.gnu.org; 29 Aug 2023 15:36:29 +0000 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 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 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== 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) 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) From: Stefan Monnier To: Gerd =?windows-1252?Q?M=F6llmann?= Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: ("Gerd =?windows-1252?Q?M=F6l?= =?windows-1252?Q?lmann=22's?= message of "Tue, 29 Aug 2023 09:07:25 +0200") Message-ID: References: Date: Tue, 29 Aug 2023 11:35:22 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.120 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 30 01:11:48 2023 Received: (at 65516) by debbugs.gnu.org; 30 Aug 2023 05:11:48 +0000 Received: from localhost ([127.0.0.1]:51914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbDUa-0003gi-Au for submit@debbugs.gnu.org; Wed, 30 Aug 2023 01:11:48 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:56445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbDUX-0003gS-0H for 65516@debbugs.gnu.org; Wed, 30 Aug 2023 01:11:47 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-500a8b2b73eso7550452e87.0 for <65516@debbugs.gnu.org>; Tue, 29 Aug 2023 22:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693372291; x=1693977091; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=KUWRNyJRARf6MADO+ve2Qh2Rlcnl2+PM1tmL340ktFQ=; b=PQOUfOOVptp+Sn1yj0P8AZ7EmGpqIK/jqz7nUKwyk+NLQBjKiCTNXTobX7hCHWWh4/ pgpzrNZzTa9rC3GXbAFp+sqwuX2m7Yl9hgaiIKnDqksAMm8H1owKUBCekZGacYfaRK6d XjMZdDUq9C26fkLEKUwF2Woa8cUo7B2eFrUiPecIxl0Usqz/Ft585yPkGRrBW9winnV5 Kd8YQTmsh28MIWNoHxDNyghOlccM+x4exbxBYq2zAeYP7c4k418waxSYy7H48NthM2on puBdZUGMF9bIe8zXyL8XrDCMqDkC0gw8TFt0ECZ8QKvoN2Bhfc0IBLeuLJiv0WJMI7vy gqZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693372291; x=1693977091; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KUWRNyJRARf6MADO+ve2Qh2Rlcnl2+PM1tmL340ktFQ=; b=JWaNF0mI8na2DywHVDfDLwnS3RZWLx9lYprcGF8pC0yLDbWJ6/d1tAaswZiKi8HOiw 99WRa0C3Bv07PVntrAtIsrqaeay6fmO5IaZrSUR/HeuqQ7HOEAweMg1263IDxAnE3VtO kcgQxWohhXt+G8yWKuqxjkPCPPWbrIWsPSQN7XYVroBziJ7H1dK/jwdDA1osrJrT8DNZ vhV9KzXqY1vgCH0Z8nHfNQWdMW8XFV5eQaU2sptjzIF74Odr3euJETAgfYqddt/AFDMJ 5KwukOisd5HWvPFpFFBlUmRV7Ah5setyMtbAehgjmhgKs8LEKx9qdXMbCVOQBuVFhIt7 rikw== X-Gm-Message-State: AOJu0YxiIYLgbhPWWp2OeO0sjKKzj2CuUSpJLA8lfheF21xl7ccidCL0 Li+DFnPavaoTUY94z7VwN+o= X-Google-Smtp-Source: AGHT+IFZGQmUnwXOMU7/CqZ/nZsIg3ZBNImMN35bQUM82AGqQBNp1cNPEryqBt+TwDS1t1P5mvfh0g== X-Received: by 2002:a05:6512:31c7:b0:500:98ff:4162 with SMTP id j7-20020a05651231c700b0050098ff4162mr720227lfe.40.1693372290757; Tue, 29 Aug 2023 22:11:30 -0700 (PDT) Received: from Mini.fritz.box (p4fe3acd3.dip0.t-ipconnect.de. [79.227.172.211]) by smtp.gmail.com with ESMTPSA id x11-20020aa7d6cb000000b0052284228e3bsm6369623edr.8.2023.08.29.22.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 22:11:30 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Stefan Monnier Subject: Re: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or In-Reply-To: (Stefan Monnier's message of "Tue, 29 Aug 2023 11:35:22 -0400") References: Date: Wed, 30 Aug 2023 07:11:28 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65516 Cc: Michael Heerdegen , 65516@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> To summarize: The "culprit" is this commit: > > Have you confirmed experimentally that this is the culprit for your > use case? No, I didn't experiment. I found the circumstancial evidence sufficient for me. Of course, there might be additional stuff and so on, as usual. > Do you have a recipe? Checkout cc0f546825e whidh should have an cl-flet where the first clause of the &or has a def-form in it. Then run cl-macs-tests and/or edebug-tests. IIRC, Stefan Kangas noticed that, which led to the current bug. >> + (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. Ok, thanks. I'm thinking of how to proceed from here. IMO, there's at this point enough info now that someone (tm) could fix this, but the cost/benefit ration is sp high that I at least can't bring me to to do it. I can only offer to put it on my todo list, which is, TBH, rather a to-procrastinate list. Any other takers? If not, I'd say let's close this or what else seems appropriate to the maintainers.