GNU bug report logs -
#49629
27.2; electric-pair-mode doesn't work for angle brackets in HTML file
Previous Next
Reported by: Allen Li <darkfeline <at> felesatra.moe>
Date: Sun, 18 Jul 2021 23:53:01 UTC
Severity: normal
Found in version 27.2
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Thu, Jul 22, 2021 at 11:34 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
> Allen Li <darkfeline <at> felesatra.moe> writes:
>
> > What I've found so far is that using Edebug to step through
> > electric-pair-skip-if-helps-balance, if I manually step past
> > (delete-char -1) and then press g (edebug-go-mode) then the bug
> > disappears. Pressing g before stepping past (delete-char -1) causes
> > the bug.
>
> If I remember correctly, electric-pair-mode works by doing a lot of
> magic in `post-self-insert-hook'? In my experience, trying to edebug
> through code when that hook is running often leads to peculiar results.
>
> That is, you have to debug via other means when trying to see what's
> actually happening here, I think. (I.e., adding `message's all over the
> place and other tedious things...)
Thanks for the advice, kind of. I tried some printf debugging and I
noticed that
the bug goes away when I add (message "%S"
(buffer-substring-no-properties (point-min) (point-max)))
to the top of electric-pair--balance-info. Maybe I'm being dense, but I think
that expression should not have this kind of side effect.
This bug report was last modified 3 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.