From unknown Mon Aug 18 04:45:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54195: 27.1; electric-pair-mode assertion failure in HTML+JS mode Resent-From: Jeff Chase Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Feb 2022 08:16:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 54195@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16460361353661 (code B ref -1); Mon, 28 Feb 2022 08:16:07 +0000 Received: (at submit) by debbugs.gnu.org; 28 Feb 2022 08:15:35 +0000 Received: from localhost ([127.0.0.1]:59937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nObBu-0000wy-ES for submit@debbugs.gnu.org; Mon, 28 Feb 2022 03:15:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:35508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOWjo-0008VN-Ak for submit@debbugs.gnu.org; Sun, 27 Feb 2022 22:30:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOWjo-0003aM-4t for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2022 22:30:16 -0500 Received: from [2a00:1450:4864:20::431] (port=36486 helo=mail-wr1-x431.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOWjk-0008E4-MW for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2022 22:30:15 -0500 Received: by mail-wr1-x431.google.com with SMTP id r10so13287001wrp.3 for ; Sun, 27 Feb 2022 19:30:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=FCi6GpwFLMr8/+kL8ts7c7SrA+K5zY8Ym3ctlgfg/Fo=; b=G+M1j8AHy8kD5sspAxZkDDpeNVYqdvwetBr/tGbFGLB49TjwcRxSNARFVr/evNKfwx VM6rk7JytbqDf1UN0qrPDYuLllGDQucdH2lCWXa5Tssv2dIKFVSch6L8fnFKUVl/FlqQ 5FIs4MSxhkGOWbs6/ndJPRzuFNQ824PQggrnlC6pJBdjb0UL/KRBVNIY4AEwzdRKOkFZ S2z+A3B7Vd5OSLaBqmd+qbShZzxxo1Fyu1R1DeCNygsljfpH1bEs7xdKiiYd0KigipMI Sor9XS3rYk1LToegh0yKI6xdnlGKevB2keTmQyLBLdIsrQuDuK9+DaL3Xixsvo76gvbh Bs6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=FCi6GpwFLMr8/+kL8ts7c7SrA+K5zY8Ym3ctlgfg/Fo=; b=5uXAQXHh1EXEQWJvT3BUbbH4BypUDtU2hfa9CYLfNjbdMMVHJLrmvbbLw4B7gIg3GV bDBSxatqFX3IvofihetKHenKy2BRyRyWX/e60s/Fseq5Pq2FokRiDPvUPnVrNxT7cpyJ nPTO3aeG0mGTQvmzFfwZyWxhxoywt8og/L1XcdVaDQRTkNdMsaYqrSkifRjOdUZJSsV/ RQ3mnyqdE53JX2F6fXLDU2nQS7b9Gdv2I/MZIsK+xR2FW/y0kAFwB9JwT3WsLpQd7H02 opTaEL2z97e/fgTQxopVfaaIOfdTCHg0BHC90uxORGFoaogSc4O2wiwwmHIy6R6IvGZD mikQ== X-Gm-Message-State: AOAM530zEcurd4iAhDM8u8pPKNInN8D67+pYPxaPoutCM8CKlFtwFsHf SypMqlla6uLq+jEY3XrfLG0YVe18z4unOyulZlxF7swXNGU= X-Google-Smtp-Source: ABdhPJzpFg7KjRkc6t4QDE3aGGekdMZx+cmkOJ5Kyrw9OR6RssY5o3wACd5dxgifLguCB1k5KDUulotx+RK9sXjxGHY= X-Received: by 2002:adf:a389:0:b0:1ea:95ea:58dc with SMTP id l9-20020adfa389000000b001ea95ea58dcmr14661606wrb.659.1646019009419; Sun, 27 Feb 2022 19:30:09 -0800 (PST) MIME-Version: 1.0 From: Jeff Chase Date: Sun, 27 Feb 2022 22:29:58 -0500 Message-ID: Content-Type: multipart/alternative; boundary="00000000000059ac3005d90baa01" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::431 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=jeff.chase@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-Mailman-Approved-At: Mon, 28 Feb 2022 03:15:33 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --00000000000059ac3005d90baa01 Content-Type: text/plain; charset="UTF-8" 1) open a new file named 'test.html' 2) enable electric-pair-mode 3) Add 4) When mark is between script tags should be in HTML+JS mode 5) Enter `foo()` on the line between script tags The closing paren should overwrite the auto closing paren but instead a new one is added and the minibuffer shows an error: Assertion failed: (>= (cadr sgml--syntax-propertize-ppss) 0) This does not happen under the other major modes I tried nor in HTML+ mode outside of the script tags. In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu) of 2021-03-27, modified by Debian built on x86-conova-01 System Description: Debian GNU/Linux 11 (bullseye) Recent messages: next-line: End of buffer (New file) Type C-x 1 to delete the help window, C-M-v to scroll help. Saving file /tmp/test... Wrote /tmp/test kill-line: End of buffer Auto-saving...done cl--assertion-failed: Assertion failed: (>= (cadr sgml--syntax-propertize-ppss) 0) Auto-saving... Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-x=no --without-gsettings 'CFLAGS=-g -O2 -ffile-prefix-map=/build/emacs-LlFm6W/emacs-27.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: SOUND GPM DBUS NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 ZLIB XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: HTML+JS Minor modes in effect: electric-pair-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail cl-extra help-fns radix-tree help-mode cus-start cus-load elec-pair mhtml-mode css-mode smie eww mm-url gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums time-date mail-utils wid-edit mm-util mail-prsvr thingatpt url-queue url url-proxy url-privacy url-expand url-methods url-history mailcap shr text-property-search url-cookie url-domsuf url-util puny image svg xml format-spec color js imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode dom term/xterm xterm regexp-opt finder-inf info tool-bar package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 281157 11962) (symbols 48 20226 1) (strings 32 93300 2645) (string-bytes 1 2493314) (vectors 16 24683) (vector-slots 8 311705 10980) (floats 8 233 302) (intervals 56 570 0) (buffers 1000 17)) --00000000000059ac3005d90baa01 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
1) open a new file named 'test.html'
2) enable = electric-pair-mode
3) Add

=C2=A0 =C2=A0 <script>

=C2= =A0 =C2=A0 </script>

4) When mark is between script tags shoul= d be in HTML+JS mode
5) Enter `foo()` on the line between script tags
The closing paren should overwrite the auto closing paren but instead<= br>a new one is added and the minibuffer shows an error:

=C2=A0 =C2= =A0 Assertion failed: (>=3D (cadr sgml--syntax-propertize-ppss) 0)
This does not happen under the other major modes I tried nor in HTML+
= mode outside of the script tags.


In GNU Emacs 27.1 (build 1, x86= _64-pc-linux-gnu)
=C2=A0of 2021-03-27, modified by Debian built on x86-c= onova-01
System Description: Debian GNU/Linux 11 (bullseye)

Recen= t messages:
next-line: End of buffer
(New file)
Type C-x 1 to dele= te the help window, C-M-v to scroll help.
Saving file /tmp/test...
Wr= ote /tmp/test
kill-line: End of buffer
Auto-saving...done
cl--asse= rtion-failed: Assertion failed: (>=3D (cadr sgml--syntax-propertize-ppss= ) 0)
Auto-saving...


Configured using:
=C2=A0'configure= --build x86_64-linux-gnu --prefix=3D/usr
=C2=A0--sharedstatedir=3D/var/= lib --libexecdir=3D/usr/lib
=C2=A0--localstatedir=3D/var/lib --infodir= =3D/usr/share/info
=C2=A0--mandir=3D/usr/share/man --enable-libsystemd -= -with-pop=3Dyes
=C2=A0--enable-locallisppath=3D/etc/emacs:/usr/local/sha= re/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/2= 7.1/site-lisp:/usr/share/emacs/site-lisp
=C2=A0--with-sound=3Dalsa --wit= hout-gconf --with-mailutils --build
=C2=A0x86_64-linux-gnu --prefix=3D/u= sr --sharedstatedir=3D/var/lib
=C2=A0--libexecdir=3D/usr/lib --localstat= edir=3D/var/lib
=C2=A0--infodir=3D/usr/share/info --mandir=3D/usr/share/= man --enable-libsystemd
=C2=A0--with-pop=3Dyes
=C2=A0--enable-localli= sppath=3D/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/= emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp<= br>=C2=A0--with-sound=3Dalsa --without-gconf --with-mailutils --with-x=3Dno=
=C2=A0--without-gsettings 'CFLAGS=3D-g -O2
=C2=A0-ffile-prefix-m= ap=3D/build/emacs-LlFm6W/emacs-27.1+1=3D. -fstack-protector-strong
=C2= =A0-Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-tim= e
=C2=A0-D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro'

Co= nfigured features:
SOUND GPM DBUS NOTIFY INOTIFY ACL LIBSELINUX GNUTLS L= IBXML2 ZLIB XIM
MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP
Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale= -coding-system: utf-8-unix

Major mode: HTML+JS

Minor modes in= effect:
=C2=A0 electric-pair-mode: t
=C2=A0 tooltip-mode: t
=C2= =A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 menu-b= ar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mo= de: t
=C2=A0 font-lock-mode: t
=C2=A0 auto-composition-mode: t
=C2= =A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 li= ne-number-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows= :
None found.

Features:
(shadow sort mail-extr emacsbug messag= e rmc dired dired-loaddefs rfc822
mml mml-sec epa derived epg epg-config= mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils m= ailheader sendmail cl-extra
help-fns radix-tree help-mode cus-start cus-= load elec-pair mhtml-mode
css-mode smie eww mm-url gnus nnheader gnus-ut= il rmail rmail-loaddefs
rfc2047 rfc2045 ietf-drums time-date mail-utils = wid-edit mm-util
mail-prsvr thingatpt url-queue url url-proxy url-privac= y url-expand
url-methods url-history mailcap shr text-property-search ur= l-cookie
url-domsuf url-util puny image svg xml format-spec color js ime= nu
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engi= ne
cc-vars cc-defs sgml-mode dom term/xterm xterm regexp-opt finder-inf<= br>info tool-bar package easymenu browse-url url-handlers url-parse
auth= -source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache js= on subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-lo= addefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-f= loat-type tabulated-list replace newcomment
text-mode elisp-mode lisp-mo= de prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer se= lect mouse jit-lock font-lock syntax
facemenu font-core term/tty-colors = frame minibuffer cl-generic cham
georgian utf-8-lang misc-lang vietnames= e tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew gree= k romanian slovak czech
european ethiopic indian cyrillic chinese compos= ite charscript charprop
case-table epa-hook jka-cmpr-hook help simple ab= brev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroex= p files
text-properties overlay sha1 md5 base64 format env code-pages mu= le
custom widget hashtable-print-readable backquote threads dbusbind
= inotify lcms2 multi-tty make-network-process emacs)

Memory informati= on:
((conses 16 281157 11962)
=C2=A0(symbols 48 20226 1)
=C2=A0(st= rings 32 93300 2645)
=C2=A0(string-bytes 1 2493314)
=C2=A0(vectors 16= 24683)
=C2=A0(vector-slots 8 311705 10980)
=C2=A0(floats 8 233 302)<= br>=C2=A0(intervals 56 570 0)
=C2=A0(buffers 1000 17))
--00000000000059ac3005d90baa01-- From unknown Mon Aug 18 04:45:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54195: 27.1; electric-pair-mode assertion failure in HTML+JS mode Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Feb 2022 09:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Jeff Chase Cc: 54195@debbugs.gnu.org Received: via spool by 54195-submit@debbugs.gnu.org id=B54195.164604065619548 (code B ref 54195); Mon, 28 Feb 2022 09:31:02 +0000 Received: (at 54195) by debbugs.gnu.org; 28 Feb 2022 09:30:56 +0000 Received: from localhost ([127.0.0.1]:60035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOcMp-00055E-LB for submit@debbugs.gnu.org; Mon, 28 Feb 2022 04:30:55 -0500 Received: from quimby.gnus.org ([95.216.78.240]:34384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOcMo-00054s-0H for 54195@debbugs.gnu.org; Mon, 28 Feb 2022 04:30:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1XBLlKuxxWMzrssUn5mcmjtSuJ5l6YVS77kxVuFBHq4=; b=eR/E2yIMaKJ4TW7C1fc35/fjIB ifKo4v930X16sWMIj25PABP9pXp1GmDZNHt58B1BAySEfZGjwWR1tudgzvgu3lq+4goFd6yt5EdCM NCmjNZ/SZiMd9+GO6fuZ3dAvwDLnvz+O5G/bDSUUO7vwCwLG8FCtGP4sT957MYey3PhQ=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nOcMd-0005mQ-9X; Mon, 28 Feb 2022 10:30:47 +0100 From: Lars Ingebrigtsen References: X-Now-Playing: Xiu Xiu's _The Passenger_: "The Passenger" Date: Mon, 28 Feb 2022 10:30:42 +0100 In-Reply-To: (Jeff Chase's message of "Sun, 27 Feb 2022 22:29:58 -0500") Message-ID: <87zgmbqqwt.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Jeff Chase writes: > 1) open a new file named 'test.html' > 2) enable electric-pair-mode > 3) Add > > > > 4) When mark is between script tags should be in HTML+JS mode > 5) Enter `foo()` on the li [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jeff Chase writes: > 1) open a new file named 'test.html' > 2) enable electric-pair-mode > 3) Add > > > > 4) When mark is between script tags should be in HTML+JS mode > 5) Enter `foo()` on the line between script tags > > The closing paren should overwrite the auto closing paren but instead > a new one is added and the minibuffer shows an error: > > Assertion failed: (>= (cadr sgml--syntax-propertize-ppss) 0) > > This does not happen under the other major modes I tried nor in HTML+ > mode outside of the script tags. I've now fixed this in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 28 04:31:03 2022 Received: (at control) by debbugs.gnu.org; 28 Feb 2022 09:31:04 +0000 Received: from localhost ([127.0.0.1]:60043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOcMx-00056J-LL for submit@debbugs.gnu.org; Mon, 28 Feb 2022 04:31:03 -0500 Received: from quimby.gnus.org ([95.216.78.240]:34394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOcMv-00055M-OT for control@debbugs.gnu.org; Mon, 28 Feb 2022 04:31:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mJJQ6iCP2ZXxDjt/uRxR2MRLlkMDWSB9eu2Kc2rly/U=; b=QKXcE0BYAz/TkdFYM9ODQ4FhO+ hUphIqDWBv0JbrZF4IDrBeCueV6HvHcsew4f3gOk1wSO+xdurFJ/tMiPaT/iI0/R4emFVfy8VhCx+ rYcoFIgPCmXDzUK1/Lo1N8/IVEGoeGQwW9xJiCEjdBCGp9D6zxeLZX361QUJonfXDHsI=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nOcMk-0005mc-Ql for control@debbugs.gnu.org; Mon, 28 Feb 2022 10:30:55 +0100 Date: Mon, 28 Feb 2022 10:30:49 +0100 Message-Id: <87y21vqqwm.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #54195 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 54195 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 54195 29.1 quit From unknown Mon Aug 18 04:45:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54195: master 15a76160bb: Don't throw errors while propertizing in sgml-mode Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Feb 2022 14:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 54195@debbugs.gnu.org Received: via spool by 54195-submit@debbugs.gnu.org id=B54195.16460594525219 (code B ref 54195); Mon, 28 Feb 2022 14:45:02 +0000 Received: (at 54195) by debbugs.gnu.org; 28 Feb 2022 14:44:12 +0000 Received: from localhost ([127.0.0.1]:60633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOhFz-0001M7-U3 for submit@debbugs.gnu.org; Mon, 28 Feb 2022 09:44:12 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOhFy-0001Lt-GN for 54195@debbugs.gnu.org; Mon, 28 Feb 2022 09:44:11 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 62BFA804E6; Mon, 28 Feb 2022 09:44:04 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D6DB680543; Mon, 28 Feb 2022 09:44:02 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1646059442; bh=ZNbvxxlSL3Y2X+n+8U5BZXFKS2sa4vMEL36QRtdSRGg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=esviXTHtLhmY9rAjMf8MGs14kPX2r9J6uz1jSQbdO2cqFav1kkdOiwz5q3Y5DcZHS 2tYOjDXd8kNj4JOghj64mVawxdyIcarwOjktcrtm8zJx0W/ytPLAJfww7ZIZGG5csr qHL+SmckRlmT3AY1sfvtJv/aRBiOoTbetijHN/YJOeD5AIz781dZXcYU6Vm2XgwUMo bwqEVBvvk0PidTwQdztjMdFuKanFp4Z9JYFn3s0o9TqL9tKXrzpaAUt9kOEtT5V1L/ y0mE+ygnzQnP7yYZMDvhzO63QeQqEoRMtAEsRnk/rc+R2cF5NV9SU9iiY7x2y/3qYI JeFJkWbJ55SAw== Received: from pastel (unknown [45.72.208.76]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B09A41204BE; Mon, 28 Feb 2022 09:44:02 -0500 (EST) From: Stefan Monnier Message-ID: References: <164604066920.6274.17125818957525062942@vcs2.savannah.gnu.org> <20220228093109.81A17C0DA33@vcs2.savannah.gnu.org> Date: Mon, 28 Feb 2022 09:44:01 -0500 In-Reply-To: <20220228093109.81A17C0DA33@vcs2.savannah.gnu.org> (Lars Ingebrigtsen's message of "Mon, 28 Feb 2022 04:31:09 -0500 (EST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.058 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Don't > throw an error when propertizing (bug#54195). > --- > lisp/textmodes/sgml-mode.el | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el > index 83631e6475..b49541f47d 100644 > --- a/lisp/textmodes/sgml-mode.el > +++ b/lisp/textmodes/sgml-mode.el > @@ -419,11 +419,11 @@ These have to be run via `sgml-syntax-propertize'")) > (defun sgml-syntax-propertize (start end &optional rules-function) > "Syntactic keywords for `sgml-mode'." > (setq sgml--syntax-propertize-ppss (cons start (syntax-ppss start))) > - (cl-assert (>= (cadr sgml--syntax-propertize-ppss) 0)) > - (sgml-syntax-propertize-inside end) > - (funcall (or rules-function sgml--syntax-propertize) (point) end) > - ;; Catch any '>' after the last quote. > - (sgml--syntax-propertize-ppss end)) > + (when (>= (cadr sgml--syntax-propertize-ppss) 0) > + (sgml-syntax-propertize-inside end) > + (funcall (or rules-function sgml--syntax-propertize) (point) end) > + ;; Catch any '>' after the last quote. > + (sgml--syntax-propertize-ppss end))) Hmm... this isn't right. The PPSS really shouldn't have a negative value here. The problem is that when we do as in the recipe (which does not require `electric-pair-mode` to reproduce), mhtml calls `sgml-syntax-propertize` on the `` tag and the `syntax-ppss` call returns the state of the JS parsing at the end of the JS code rather than the state of the SGML parsing at the beginning of the tag. IOW it's a bug in the interaction between `mhtml` and `syntax-ppss`. To illustrate the problem in a way which doesn't signal an error, try the following: "foo "bar as you can see, the SGML part carefully ignores the " thingies outside of quotes. Now remove the closing paren in the JS code: suddenly the SGML code is all confused because it thinks everything after the open paren is inside of a tag (because the SGML mode gives paren syntax to < and > (but not to parens) and uses the paren depth to decide whether we're inside a tag or not). Stefan From unknown Mon Aug 18 04:45:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54195: master 15a76160bb: Don't throw errors while propertizing in sgml-mode Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Mar 2022 15:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 54195@debbugs.gnu.org Received: via spool by 54195-submit@debbugs.gnu.org id=B54195.164614775321610 (code B ref 54195); Tue, 01 Mar 2022 15:16:01 +0000 Received: (at 54195) by debbugs.gnu.org; 1 Mar 2022 15:15:53 +0000 Received: from localhost ([127.0.0.1]:37987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nP4EC-0005cU-OY for submit@debbugs.gnu.org; Tue, 01 Mar 2022 10:15:53 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nP4EB-0005cF-HY for 54195@debbugs.gnu.org; Tue, 01 Mar 2022 10:15:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yy9h7lkYWp0OxXntmh6WT04NB8IA1Bq0GF1YlUTC9zI=; b=tw/5+b4CzvfR5WdzQgRJZinppB Ur7HYMT/PJoS0epmEhDdTJEteTvd5aN6XJpVVwAeb11lwW3hl7/khISYO8bVLx92JQqU4/beGEJTD UZ5KxQWu6UJekt02cH26yUzawXUqA1qE0+BDeUUxqQZ4RfSf6nV0h5WyVTrCth/Ajcr0=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nP4E1-0007RD-Kz; Tue, 01 Mar 2022 16:15:44 +0100 From: Lars Ingebrigtsen References: <164604066920.6274.17125818957525062942@vcs2.savannah.gnu.org> <20220228093109.81A17C0DA33@vcs2.savannah.gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVTW2R6foE2P0ic pK4cIyn///9GHbZRAAAAAWJLR0QF+G/pxwAAAAlwSFlzAAAewgAAHsIBbtB1PgAAAAd0SU1FB+YD AQ8JJBVIVy8AAAGgSURBVDjLhZQBkqQgDEU/cQ4A7QVSGQ7QjnuAXYr7n2l/Ajh211RNbEvN4/8E lEbK8AMKwLLBlCdQ8BbqWeZ3ICHl8sB2HPtxPktWKSkNQSrlmdN5nkcJ1xWFsR+HX+6mZqIvz3FE PFIRQDRB1WY0siReKrm3KtoklFYT4U8M6iPHScKUcPSopK3ZxPDBIrV3+nhuerVQBLCo3RYBS1DU OiWmNwm6A2uUhH0n8IOgmrcFB+HE4H0n6G5F0KMoc858ZJ2KBYLNhGi+AT8DUKLVgYb/iGXRo1+/ ad/ASR3gVRFkXK78BNU0vNp3kQXqeGwxkR8ASR/kHdhyewM6y7cJ3nqJO/PFBZbC31bzxY+ZcxHn OI13ZXMRf4wJ7DfQ6uvM+5qG3BSlZMZ6TGmLSOjINyD7vu0eJ6JbWRaP+LLZtKKP72tZYWyCmOAd dN+1Y3/4Ct6AJ+vVbrsAv5u6+vNNWVZXf2PzCU3AzhhfE/zjPTeecRelAH+WgptdppXnz49VnAAy /hYCXEtE/f7Ynuc5wPMCm0uAPQ/JBepnFEfJ/wEvdsKLrmplhQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMi0wMy0wMVQxNTowOTozNiswMDowML6Y8zwAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMt MDFUMTU6MDk6MzYrMDA6MDDPxUuAAAAAAElFTkSuQmCC X-Now-Playing: Neil Young's _After The Gold Rush_: "Southern Man" Date: Tue, 01 Mar 2022 16:15:38 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 28 Feb 2022 09:44:01 -0500") Message-ID: <87lextn1ph.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > The PPSS really shouldn't have a negative value here. The problem is > that when we do as in the recipe (which does not require > `electric-pair-mode` to reproduce), mhtml calls `sgml-syntax-propert [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: > The PPSS really shouldn't have a negative value here. The problem is > that when we do as in the recipe (which does not require > `electric-pair-mode` to reproduce), mhtml calls `sgml-syntax-propertize` > on the `` tag and the `syntax-ppss` call returns the state of > the JS parsing at the end of the JS code rather than the state of the > SGML parsing at the beginning of the tag. > > IOW it's a bug in the interaction between `mhtml` and `syntax-ppss`. I assumed that people didn't normally get any erroring-out here because these functions are normally called from font-locking, which catches most errors. When electric-pair-mode is used, the syntax functions are called via a different code path that doesn't catch errors, so I thought it'd make most sense to not call `error' from the code at all. But yes, the parsing won't be correct. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no