From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#49629: 27.2; electric-pair-mode doesn't work for angle brackets in HTML file Date: Sun, 26 Jun 2022 01:41:49 -0700 Message-ID: References: <801r7vgoxm.fsf@felesatra.moe> <87im11gbxf.fsf_-_@gnus.org> <8735rybg2f.fsf@gnus.org> <87tuk978gm.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ef319905e255c63b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27837"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49629@debbugs.gnu.org, Stefan Monnier To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 26 10:43:17 2022 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 1o5NrR-00075T-Od for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jun 2022 10:43:17 +0200 Original-Received: from localhost ([::1]:36906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5NrQ-00033L-CI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jun 2022 04:43:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5NrC-00033C-Fe for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2022 04:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5NrC-0002Ak-7d for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2022 04:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5NrC-0006bL-38 for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2022 04:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jun 2022 08:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49629 X-GNU-PR-Package: emacs Original-Received: via spool by 49629-submit@debbugs.gnu.org id=B49629.165623293025315 (code B ref 49629); Sun, 26 Jun 2022 08:43:02 +0000 Original-Received: (at 49629) by debbugs.gnu.org; 26 Jun 2022 08:42:10 +0000 Original-Received: from localhost ([127.0.0.1]:46693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5NqM-0006aE-0O for submit@debbugs.gnu.org; Sun, 26 Jun 2022 04:42:10 -0400 Original-Received: from mail-ej1-f47.google.com ([209.85.218.47]:45704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5NqJ-0006Zq-83 for 49629@debbugs.gnu.org; Sun, 26 Jun 2022 04:42:08 -0400 Original-Received: by mail-ej1-f47.google.com with SMTP id h23so12973822ejj.12 for <49629@debbugs.gnu.org>; Sun, 26 Jun 2022 01:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oH15y1VkoqG0996ZyRqYWsUSBYs6Z+nO1wM2p6rYWzY=; b=HzPzyArOxWlpuXfZU5JwouH+fSi69r7hB1IKrA5aTxoNU+uft/978RYXG5cMcVDEVz G02JEXEIlRYYD3UCh+g0N4hzNV0Q6lpd3PjCorZZR1OqZXb3gc3EEZNk2q79Y+nNLY5i SNIHjkWWzuvC9evda50nQHeFXjH1AI4u3wpISYr4f7qAK3IWKruwpVL2VnPnlNQlAQV1 Gay5Kq/DUEKBeYRXUdAjqGZ4eJvxRyFlPUlSmNXc+kyJcmSUEFosnt6QcV1wesmG3OHg Y7z6fjXqUdaL4enYegDxUdQpTdeGeeDRXp/m5zpFl+lXFF4EDbphCNNbaz0+p36T1Dsj RlkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oH15y1VkoqG0996ZyRqYWsUSBYs6Z+nO1wM2p6rYWzY=; b=5lcz9yU5Vo7qijzOF4u1K9Jy4X0eq6Sxvi80sivY+h4gPKxBOcBQaTAezECi0P6Kx/ Iwin0sMNTBWqUBSWAlGAfgzFMd9fjt2xg2+QymWt5Rt2YsziMUOpu49zufoLRsfKu2Dw tQGpwscbToec+/HGIDyhnZfGXtKLpZardHTyv5NCriapB03u92Tb6jBwYdwCQBugvr76 zbLDi4kdsur72tLzNetQ/vpd5fpDL4FebQnzuzPFZn8/2FSH8vPBmruyun9/ZpyiPw6U +l60E3+inUoIPkfSiybTNM8hOXYnfVa9EzT41cKkJgNsPLryUVRISVCNvovMk7r+EN32 WX5w== X-Gm-Message-State: AJIora9MlHdKMl7e23GPQtymothtAdmx/mGjH0lYdbZoFRr0ftBuYjwp vstL7P6TsSxSJQrJ6J9v6ubSzRzzKGIdPXHD1Gryqw== X-Google-Smtp-Source: AGRyM1uPZCNBmR+qGQwpM0Ob8+XaZDKPN8hFXHNCXLMvHmdynbBEQGFlQef8Qjwc8z4YGYlP+/eZ6qQF1KWbFgzkfVU= X-Received: by 2002:a17:906:2086:b0:715:7983:a277 with SMTP id 6-20020a170906208600b007157983a277mr7150367ejq.386.1656232921207; Sun, 26 Jun 2022 01:42:01 -0700 (PDT) In-Reply-To: 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" Xref: news.gmane.io gmane.emacs.bugs:235311 Archived-At: --000000000000ef319905e255c63b Content-Type: text/plain; charset="UTF-8" On Thu, Dec 9, 2021 at 2:31 AM Allen Li wrote: > I have bisected this regression to 7fff418edf56244a1fcf54718523aa9b5cb3a854 > > I will cc Stefan on the miniscule chance he still remembers anything about > this and can save me time. > Otherwise, I will see if I can pinpoint the regression (or if I messed up > the bisect). > Posting an update (or non-update) on this. This regression did seem to be introduced by 7fff418edf56244a1fcf54718523aa9b5cb3a854, however I'm pretty sure there's nothing wrong with the commit itself, it's just that jiggling the code around made this regression reliably occur. > > Author: Stefan Monnier > Date: Fri Nov 29 11:51:48 2019 -0500 > * lisp/textmodes/mhtml-mode.el: Fix bug#38372 > > The `sgml-syntax-propertize-rules` rely on the > `sgml--syntax-propertize-ppss` > setup by `sgml-syntax-propertize` so it is not correct/safe to use > them directly like html used to do. > > Change `sgml-syntax-propertize` so it can be used by mhtml, > and then adjust mhtml-mode accordingly. > > * lisp/textmodes/mhtml-mode.el: Remove redundant `eval-and-compile`. > Only require cl-lib at compile-time. > (mhtml--syntax-propertize): New const, extracted from > mhtml-syntax-propertize. > (mhtml-syntax-propertize): Use `sgml-syntax-propertize`. > > * lisp/textmodes/sgml-mode.el (sgml--syntax-propertize): New const, > extracted from sgml-syntax-propertize. > (sgml-syntax-propertize): Add optional `rules-function` arg. > lisp/textmodes/mhtml-mode.el | 44 > ++++++++++++++++++++------------------------ > lisp/textmodes/sgml-mode.el | 13 ++++++++----- > 2 files changed, 28 insertions(+), 29 deletions(-) > > On Sun, Aug 1, 2021 at 10:41 AM Lars Ingebrigtsen wrote: > >> Allen Li writes: >> >> > Thus, I resorted to actually trying to understand the code. >> >> Darn, I hate it when that happens. >> >> > I've tracked down the bug to unexpected behavior from the `scan-sexps` >> > call in this part of `electric-pair--balance-info`: >> >> I can reproduce exactly what you're seeing -- when edebugging, the >> problem goes away, etc. >> >> I put a >> >> (redisplay t) >> >> into the function, and that also made the problem go away, but that's as >> far as I've gotten so far. So the problem does indeed seem to be >> something related to a cache/table somewhere not having been updated... >> >> -- >> (domestic pets only, the antidote for overdose, milk.) >> bloggy blog: http://lars.ingebrigtsen.no >> > --000000000000ef319905e255c63b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Dec 9, 2021 at 2:31 AM Allen Li &= lt;darkfeline@felesatra.moe> wrote:
=
I h= ave bisected this regression to=C2=A07fff418edf56244a1fcf54718523aa9b5cb3a8= 54

I will cc Stefan on the miniscule chance he sti= ll remembers anything about this and can save me time.
Otherwise,= I will see if I can pinpoint the regression (or if I messed up the bisect)= .

Posting an update (or non-upd= ate) on this.=C2=A0 This regression did seem to be introduced by 7fff418edf= 56244a1fcf54718523aa9b5cb3a854, however I'm pretty sure there's not= hing wrong with the commit itself, it's just that jiggling the code aro= und made this regression reliably occur.
=C2=A0

= Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date: =C2=A0 Fri Nov 29 1= 1:51:48 2019 -0500
=C2=A0 =C2=A0 * lisp/textmodes/mhtml-mode.el: Fix bug= #38372
=C2=A0 =C2=A0
=C2=A0 =C2=A0 The `sgml-syntax-propertize-rules= ` rely on the `sgml--syntax-propertize-ppss`
=C2=A0 =C2=A0 setup by `sgm= l-syntax-propertize` so it is not correct/safe to use
=C2=A0 =C2=A0 them= directly like html used to do.
=C2=A0 =C2=A0
=C2=A0 =C2=A0 Change `= sgml-syntax-propertize` so it can be used by mhtml,
=C2=A0 =C2=A0 and th= en adjust mhtml-mode accordingly.
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp= /textmodes/mhtml-mode.el: Remove redundant `eval-and-compile`.
=C2=A0 = =C2=A0 Only require cl-lib at compile-time.
=C2=A0 =C2=A0 (mhtml--syntax= -propertize): New const, extracted from mhtml-syntax-propertize.
=C2=A0 = =C2=A0 (mhtml-syntax-propertize): Use `sgml-syntax-propertize`.
=C2=A0 = =C2=A0
=C2=A0 =C2=A0 * lisp/textmodes/sgml-mode.el (sgml--syntax-proper= tize): New const,
=C2=A0 =C2=A0 extracted from sgml-syntax-propertize.=C2=A0 =C2=A0 (sgml-syntax-propertize): Add optional `rules-function` arg= .
=C2=A0lisp/textmodes/mhtml-mode.el | 44 ++++++++++++++++++++----------= --------------
=C2=A0lisp/textmodes/sgml-mode.el =C2=A0| 13 ++++++++----= -
=C2=A02 files changed, 28 insertions(+), 29 deletions(-)

=
On Sun, Au= g 1, 2021 at 10:41 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Allen Li <darkfeline@felesatra.moe>= ; writes:

> Thus, I resorted to actually trying to understand the code.

Darn, I hate it when that happens.

> I've tracked down the bug to unexpected behavior from the `scan-se= xps`
> call in this part of `electric-pair--balance-info`:

I can reproduce exactly what you're seeing -- when edebugging, the
problem goes away, etc.

I put a

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (redisplay t)

into the function, and that also made the problem go away, but that's a= s
far as I've gotten so far.=C2=A0 So the problem does indeed seem to be<= br> something related to a cache/table somewhere not having been updated...

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no
--000000000000ef319905e255c63b--