GNU bug report logs - #65516
30.0.50; Edebug behavior of signaling errors in &or

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Fri, 25 Aug 2023 06:29:02 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 65516 <at> debbugs.gnu.org
Subject: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or
Date: Sat, 26 Aug 2023 16:39:20 -0400
> 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





This bug report was last modified 1 year and 350 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.