GNU bug report logs - #59345
28.2; peg.el: syntax-class PEX does not advance point

Previous Next

Package: emacs;

Reported by: Sean Devlin <spd <at> toadstyle.org>

Date: Thu, 17 Nov 2022 23:50:02 UTC

Severity: normal

Found in version 28.2

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 59345 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Sean Devlin <spd <at> toadstyle.org>
Cc: Helmut Eller <eller.helmut <at> gmail.com>, 59345 <at> debbugs.gnu.org
Subject: Re: bug#59345: 28.2; peg.el: syntax-class PEX does not advance point
Date: Fri, 18 Nov 2022 07:16:38 +0100
Sean Devlin <spd <at> toadstyle.org> writes:

> In version 1.0 of peg.el, there is a PEX to match the syntax class of
> the character at point. I expected it to advance the point after
> recognizing the correct class, but it seems that it does not.

Yes, I too think this is a bug.

PEGs that match something after the char class matching part even fail,
which is definitely not correct: compare in a buffer containing "  a":

  (peg-run (peg (* [blank]) "a"))

vs.

  (peg-run (peg (* (syntax-class whitespace)) "a"))

The fist one matches up to the "a", the seconds doesn't, but should.

I CC Helmut Eller, the author of peg.el.


Michael.




This bug report was last modified 2 years and 172 days ago.

Previous Next


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