From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or Date: Sun, 27 Aug 2023 08:26:36 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8308"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Michael Heerdegen , 65516@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 27 08:27:15 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 1qa9Ex-0001yv-KW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Aug 2023 08:27:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qa9En-0003zj-41; Sun, 27 Aug 2023 02:27:06 -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 1qa9Ee-0003zU-FR for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 02:26:57 -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 1qa9Ee-0004m8-6s for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 02:26:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qa9Ej-00067r-PH for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 02:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Aug 2023 06:27: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.169311761323532 (code B ref 65516); Sun, 27 Aug 2023 06:27:01 +0000 Original-Received: (at 65516) by debbugs.gnu.org; 27 Aug 2023 06:26:53 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: (Stefan Monnier's message of "Sat, 26 Aug 2023 16:39:20 -0400") 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:268533 Archived-At: 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?