From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 11:05:09 2019 Received: (at submit) by debbugs.gnu.org; 4 Jun 2019 15:05:09 +0000 Received: from localhost ([127.0.0.1]:45582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYAzs-0002Ut-GE for submit@debbugs.gnu.org; Tue, 04 Jun 2019 11:05:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYAzq-0002US-AR for submit@debbugs.gnu.org; Tue, 04 Jun 2019 11:05:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:36435) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYAzk-0007nB-4N for submit@debbugs.gnu.org; Tue, 04 Jun 2019 11:05:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYAzi-0005Ui-Ql for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2019 11:05:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYAzc-0007h8-25 for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2019 11:04:58 -0400 Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:36106) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYAzY-0007eM-VF for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2019 11:04:50 -0400 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.92) (envelope-from ) id 1hYAzU-00016t-AF; Tue, 04 Jun 2019 17:04:44 +0200 From: Vincent Lefevre To: bug-gnu-emacs@gnu.org Subject: 27.0.50; incorrect highlighting in nXML mode with ' and raw > characters Date: Tue, 04 Jun 2019 17:04:44 +0200 Message-ID: <87zhmxie7n.fsf@vinc17.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 140.77.13.17 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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 (---) On the following file, lines 26 and below are not highlighted (i.e. they get the normal color). This is reproducible with and without the -Q option. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-06-04 built on cventin Repository revision: dd7bc5de3f59237f21e1c4b70f0ba97549ea1fb4 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster) Recent messages: Loading /home/vlefevre/share/emacs/site-lisp/mutteditor.el (source)...done Loading time...done For information about GNU Emacs and the GNU system, type C-h C-a. Using vacuous schema [2 times] Error during redisplay: (jit-lock-function 1583) signaled (cl-assertion-failed (>= (cadr sgml--syntax-propertize-ppss) 0)) Configured using: 'configure --prefix=/home/vlefevre/opt/emacs-master' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD PDUMPER LCMS2 GMP Important settings: value of $LC_COLLATE: POSIX value of $LC_CTYPE: en_US.UTF-8 value of $LC_TIME: en_DK value of $LANG: POSIX locale-coding-system: utf-8-unix Major mode: nXML Minor modes in effect: display-time-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr warnings emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-dispatcher vc-svn rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns easymenu nxml-mode nxml-outln nxml-rap sgml-mode seq byte-opt gv bytecomp byte-compile cconv dom nxml-util nxml-enc xmltok elec-pair time cus-start cus-load paren cc-styles cc-align cc-engine cc-vars cc-defs edmacro kmacro cl-loaddefs cl-lib mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame 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 minibuffer 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 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 81866 9310) (symbols 48 10247 1) (strings 32 25966 1934) (string-bytes 1 826776) (vectors 16 13514) (vector-slots 8 158635 8782) (floats 8 35 19) (intervals 56 465 0) (buffers 992 14)) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 21:14:44 2019 Received: (at 36092) by debbugs.gnu.org; 5 Jun 2019 01:14:44 +0000 Received: from localhost ([127.0.0.1]:46107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYKVo-0003O3-9m for submit@debbugs.gnu.org; Tue, 04 Jun 2019 21:14:44 -0400 Received: from mail-it1-f170.google.com ([209.85.166.170]:55680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYKVl-0003Nm-Mb for 36092@debbugs.gnu.org; Tue, 04 Jun 2019 21:14:42 -0400 Received: by mail-it1-f170.google.com with SMTP id i21so1050963ita.5 for <36092@debbugs.gnu.org>; Tue, 04 Jun 2019 18:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=DEacyXONeqMFXT2m9TZT4YO4ZFBcCgm6gGGKsti2Y8A=; b=hLmWfZcCIi5bHCLmIwNpL1r5d2tZoLE1lsVrSEFKUFXO5rkn1hXEOEhlGgNZJT53UB PZ9MerDjrtuu7XfrnxHdAGYYt9QwO22EvrkfdTQz0Gy0LRGZHTGaGfAC8qGMVdyImcgg iAFFZNjZMM46Pi+10PHF1d6R5SFDTaHAxMsLdhdI3p+GqOyeKYGcE/amopsWLkScZ0kg 5bfd6u5uTizqxsc3es5DP2+fezGyWCurbk0HAmSc5LcdGalDeJNeWRI+vrU8KMEChOWX yzSx8ZoALPmDjSN0V6cmvFCUCSpbGXXwFNnUksuFH76kr/c+cqpsFt16WX4Zz5AbsiGI MW6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=DEacyXONeqMFXT2m9TZT4YO4ZFBcCgm6gGGKsti2Y8A=; b=KtByvTeJ9esOd4TCcBwztOj/QacW9pk1UBPLTaZybDddfSEkj21MLu7NbOorvQeT3S 3+lpoledm4H/Mp1iTnpl6Nb3UwFMKZcjAIeI8pS4qgyXvkOImnAbTYGZtx7bVQkpwzI6 wmUOTKCt7N9bSsNEUCLcJDZ+0pwCA7+runp6sVhZZ3yrJapy6Kn1+MTJiYW18IRPWD/s X4JRZx5KGMTWSSQQaNTGdFB4ij02iEMStYSk/wEqA/jHZoZRwBzRDbeVHTIr6nnZcnA1 1kOF/sKEghTE7+fnASCaWM8zDcAla2RO+HywMZDwzQk/4M3f4d4754q1WG/lIsrC6wM/ OuKg== X-Gm-Message-State: APjAAAXwfIzECuTFJoo2XjVgRge9FWOhWQKTg9veWkvdQKxDUGiuHoPd jSD/5cVC3jKCEfCS2V7XMQA= X-Google-Smtp-Source: APXvYqzWGeZSp/XkASi8Y3SjsPCZiKVhHhDSwmjjshUfCIgVv1cjxBLpuHVxpqD4DcTZuSvMfslPkg== X-Received: by 2002:a24:b07:: with SMTP id 7mr21267419itd.59.1559697275987; Tue, 04 Jun 2019 18:14:35 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id q79sm9104427itb.15.2019.06.04.18.14.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 18:14:34 -0700 (PDT) From: Noam Postavsky To: Vincent Lefevre Subject: Re: bug#36092: 27.0.50; incorrect highlighting in nXML mode with ' and raw > characters References: <87zhmxie7n.fsf@vinc17.net> Date: Tue, 04 Jun 2019 21:14:33 -0400 In-Reply-To: <87zhmxie7n.fsf@vinc17.net> (Vincent Lefevre's message of "Tue, 04 Jun 2019 17:04:44 +0200") Message-ID: <874l544yva.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36092 Cc: Stefan Monnier , 36092@debbugs.gnu.org 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: -1.0 (-) --=-=-= Content-Type: text/plain Vincent Lefevre writes: > On the following file, lines 26 and below are not highlighted > (i.e. they get the normal color). This is reproducible with > and without the -Q option. It's hitting an assertion failure during syntax-propertizing. The problem seems to be that the parse-partial-sexp call in sgml--syntax-propertize-ppss isn't using the right syntax table. I wonder why it doesn't happen for sgml-mode though (as far I can tell). Stefan, any thoughts about that? Patch below fixes it, but it might just be papering over another problem. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-nxml-syntax-propertizing-assertion-failure-Bug-3.patch Content-Description: patch >From ed59843b7fa456e0614c2c63e1479458642671ea Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 4 Jun 2019 21:08:26 -0400 Subject: [PATCH] Fix nxml syntax propertizing assertion failure (Bug#36092) * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Use the syntax-ppss-table syntax-table. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode->-after-quote): New test. --- lisp/textmodes/sgml-mode.el | 17 +++++++++-------- test/lisp/nxml/nxml-mode-tests.el | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 0c5d5e56a6..09211e1661 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -399,14 +399,15 @@ (eval-and-compile (defun sgml-syntax-propertize (start end) "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 - (syntax-propertize-rules sgml-syntax-propertize-rules) - start end) - ;; Catch any '>' after the last quote. - (sgml--syntax-propertize-ppss end)) + (with-syntax-table syntax-ppss-table + (setq sgml--syntax-propertize-ppss (cons start (syntax-ppss start))) + (cl-assert (>= (cadr sgml--syntax-propertize-ppss) 0)) + (sgml-syntax-propertize-inside end) + (funcall + (syntax-propertize-rules sgml-syntax-propertize-rules) + start end) + ;; Catch any '>' after the last quote. + (sgml--syntax-propertize-ppss end))) (defun sgml-syntax-propertize-inside (end) (let ((ppss (syntax-ppss))) diff --git a/test/lisp/nxml/nxml-mode-tests.el b/test/lisp/nxml/nxml-mode-tests.el index 70816bb9de..53416b4280 100644 --- a/test/lisp/nxml/nxml-mode-tests.el +++ b/test/lisp/nxml/nxml-mode-tests.el @@ -99,5 +99,20 @@ (ert-deftest nxml-mode-prolog-comment () (should (nth 4 (syntax-ppss))) (search-forward "comment3"))) +(ert-deftest nxml-mode->-after-quote () + "Reduction from Bug#36092." + (with-temp-buffer + (insert "\n" + (make-string 1794 ?a) "\n" + "'>" + (make-string 196 ?a) "\n" + "") + (nxml-mode) + (syntax-propertize 2001) + (syntax-propertize (point-max)) ; Triggered an assert failure. + ;; Check that last tag is parsed as a tag. + (should (= 1 (- (car (syntax-ppss (1- (point-max)))) + (car (syntax-ppss (point-max)))))))) + (provide 'nxml-mode-tests) ;;; nxml-mode-tests.el ends here -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 21:48:33 2019 Received: (at 36092) by debbugs.gnu.org; 5 Jun 2019 01:48:33 +0000 Received: from localhost ([127.0.0.1]:46144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYL2W-0006Ik-SO for submit@debbugs.gnu.org; Tue, 04 Jun 2019 21:48:33 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYL2S-0006IV-Lc for 36092@debbugs.gnu.org; Tue, 04 Jun 2019 21:48:30 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 10C6F811DE; Tue, 4 Jun 2019 21:48:23 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3D2108116D; Tue, 4 Jun 2019 21:48:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1559699301; bh=6BPwdNl2t26mT0DxPCS555BKwhVJx0q0dszsN/qRL9o=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=B6QDqozhzJUJr5La3XBLSvD2oi+YzJCyE0Y7KaVdzdL5bcSgd1Y9Xg5Gir9ko4Wmc CAe2IJx8XT+DfN/SI2ikJQDtlPD24GhQLga5zCpcO44EimEyT+bzr23fri80lcke3b QoE/ZzCx71bzKSFz2vIfMaXkPE+Qjo9aq2XQVhyCl+AqQY+xw0BIkSaTyzHhv0U9fD R125wdRwOiiiH3w5uP6wRSlZWCvP8pWRgqKghZXhIjd2xgZ9VuZEWzX++XcaRkL3an QaRLHjB7B5Mge+MHvRJ6eju3NIOnfReDL4x8c+YUR/+xa01+zfzsg3WFxu0cLZmqDF CrkvbwxcG67Sg== Received: from alfajor (unknown [45.72.243.188]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9BB341203AB; Tue, 4 Jun 2019 21:48:20 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#36092: 27.0.50; incorrect highlighting in nXML mode with ' and raw > characters Message-ID: References: <87zhmxie7n.fsf@vinc17.net> <874l544yva.fsf@gmail.com> Date: Tue, 04 Jun 2019 21:48:19 -0400 In-Reply-To: <874l544yva.fsf@gmail.com> (Noam Postavsky's message of "Tue, 04 Jun 2019 21:14:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.014 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 X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36092 Cc: Vincent Lefevre , 36092@debbugs.gnu.org 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: -1.0 (-) > It's hitting an assertion failure during syntax-propertizing. The > problem seems to be that the parse-partial-sexp call in > sgml--syntax-propertize-ppss isn't using the right syntax table. Hmm... > (defun sgml-syntax-propertize (start end) > "Syntactic keywords for `sgml-mode'." > - (setq sgml--syntax-propertize-ppss (cons start (syntax-ppss start))) > - (cl-assert (>=3D (cadr sgml--syntax-propertize-ppss) 0)) > - (sgml-syntax-propertize-inside end) > - (funcall > - (syntax-propertize-rules sgml-syntax-propertize-rules) > - start end) > - ;; Catch any '>' after the last quote. > - (sgml--syntax-propertize-ppss end)) > + (with-syntax-table syntax-ppss-table > + (setq sgml--syntax-propertize-ppss (cons start (syntax-ppss start))) > + (cl-assert (>=3D (cadr sgml--syntax-propertize-ppss) 0)) > + (sgml-syntax-propertize-inside end) > + (funcall > + (syntax-propertize-rules sgml-syntax-propertize-rules) > + start end) > + ;; Catch any '>' after the last quote. > + (sgml--syntax-propertize-ppss end))) OMG! We use syntax-ppss-table in syntax-ppss but not in syntax-propertize! How dumb could I be! Of course, it usually works fine because syntax-propertize is usually called from syntax-ppss, but ... well ... not always, I just install the patch below into `master` to address that. Stefan diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 9c6d5b5829..b6cba44e77 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -283,6 +283,9 @@ syntax-propertize-via-font-lock ;; In case it was eval'd/compiled. (setq keywords font-lock-syntactic-keywords))))) =20 +(defvar-local syntax-ppss-table nil + "Syntax-table to use during `syntax-ppss', if any.") + (defun syntax-propertize (pos) "Ensure that syntax-table properties are set until POS (a buffer point)." (when (< syntax-propertize--done pos) @@ -301,47 +304,48 @@ syntax-propertize #'syntax-ppss-flush-cache 99 t)) (save-excursion (with-silent-modifications - (make-local-variable 'syntax-propertize--done) ;Just in case! - (let* ((start (max (min syntax-propertize--done (point-max)) - (point-min))) - (end (max pos - (min (point-max) - (+ start syntax-propertize-chunk-size)))) - (funs syntax-propertize-extend-region-functions)) - (while funs - (let ((new (funcall (pop funs) start end)) - ;; Avoid recursion! - (syntax-propertize--done most-positive-fixnum)) - (if (or (null new) - (and (>=3D (car new) start) (<=3D (cdr new) end))) - nil - (setq start (car new)) - (setq end (cdr new)) - ;; If there's been a change, we should go through the - ;; list again since this new position may - ;; warrant a different answer from one of the funs we've - ;; already seen. - (unless (eq funs - (cdr syntax-propertize-extend-region-functio= ns)) - (setq funs syntax-propertize-extend-region-functions))= ))) - ;; Flush ppss cache between the original value of `start' and = that - ;; set above by syntax-propertize-extend-region-functions. - (syntax-ppss-flush-cache start) - ;; Move the limit before calling the function, so the function - ;; can use syntax-ppss. - (setq syntax-propertize--done end) - ;; (message "syntax-propertizing from %s to %s" start end) - (remove-text-properties start end - '(syntax-table nil syntax-multiline ni= l)) - ;; Avoid recursion! - (let ((syntax-propertize--done most-positive-fixnum)) - (funcall syntax-propertize-function start end)))))))) + (with-syntax-table syntax-ppss-table + (make-local-variable 'syntax-propertize--done) ;Just in case! + (let* ((start (max (min syntax-propertize--done (point-max)) + (point-min))) + (end (max pos + (min (point-max) + (+ start syntax-propertize-chunk-size)))) + (funs syntax-propertize-extend-region-functions)) + (while funs + (let ((new (funcall (pop funs) start end)) + ;; Avoid recursion! + (syntax-propertize--done most-positive-fixnum)) + (if (or (null new) + (and (>=3D (car new) start) (<=3D (cdr new) end)= )) + nil + (setq start (car new)) + (setq end (cdr new)) + ;; If there's been a change, we should go through the + ;; list again since this new position may + ;; warrant a different answer from one of the funs we'= ve + ;; already seen. + (unless (eq funs + (cdr syntax-propertize-extend-region-funct= ions)) + (setq funs syntax-propertize-extend-region-functions= ))))) + ;; Flush ppss cache between the original value of `start' an= d that + ;; set above by syntax-propertize-extend-region-functions. + (syntax-ppss-flush-cache start) + ;; Move the limit before calling the function, so the functi= on + ;; can use syntax-ppss. + (setq syntax-propertize--done end) + ;; (message "syntax-propertizing from %s to %s" start end) + (remove-text-properties start end + '(syntax-table nil syntax-multiline = nil)) + ;; Avoid recursion! + (let ((syntax-propertize--done most-positive-fixnum)) + (funcall syntax-propertize-function start end))))))))) =20 ;;; Link syntax-propertize with syntax.c. =20 (defvar syntax-propertize-chunks ;; We're not sure how far we'll go. In my tests, using chunks of 2000 - ;; brings to overhead to something negligible. Passing =E2=80=98charpos= =E2=80=99 directly + ;; brings the overhead to something negligible. Passing =E2=80=98charpo= s=E2=80=99 directly ;; also works (basically works line-by-line) but results in an overhead = which ;; I thought was a bit too high (like around 50%). 2000) @@ -450,9 +454,6 @@ syntax-ppss--update-stats (cl-incf (car pair)) (cl-incf (cdr pair) (- new old)))) =20 -(defvar-local syntax-ppss-table nil - "Syntax-table to use during `syntax-ppss', if any.") - (defun syntax-ppss--data () (if (eq (point-min) 1) (progn From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 05 07:28:41 2019 Received: (at 36092) by debbugs.gnu.org; 5 Jun 2019 11:28:41 +0000 Received: from localhost ([127.0.0.1]:46649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYU5x-0003gN-DL for submit@debbugs.gnu.org; Wed, 05 Jun 2019 07:28:41 -0400 Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:43594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYU5u-0003gD-U1 for 36092@debbugs.gnu.org; Wed, 05 Jun 2019 07:28:39 -0400 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.92) (envelope-from ) id 1hYU5r-0001rl-M3; Wed, 05 Jun 2019 13:28:35 +0200 Date: Wed, 5 Jun 2019 13:28:35 +0200 From: Vincent Lefevre To: Stefan Monnier Subject: Re: bug#36092: 27.0.50; incorrect highlighting in nXML mode with ' and raw > characters Message-ID: <20190605112835.GA27320@cventin.lip.ens-lyon.fr> References: <87zhmxie7n.fsf@vinc17.net> <874l544yva.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.12+5 (cd30526c) vl-117499 (2019-05-26) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36092 Cc: Noam Postavsky , 36092@debbugs.gnu.org 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: -1.0 (-) On 2019-06-04 21:48:19 -0400, Stefan Monnier wrote: > I just install the patch below into `master` to address that. Thanks. Everything seems fine now. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 05 09:14:37 2019 Received: (at 36092) by debbugs.gnu.org; 5 Jun 2019 13:14:37 +0000 Received: from localhost ([127.0.0.1]:46771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYVkS-00028F-Qb for submit@debbugs.gnu.org; Wed, 05 Jun 2019 09:14:37 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:55444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYVkP-00027n-Ut; Wed, 05 Jun 2019 09:14:34 -0400 Received: by mail-it1-f194.google.com with SMTP id i21so3328908ita.5; Wed, 05 Jun 2019 06:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MdhxoOWgbfoIK7J887BWCJmXzmWQlPFixoBMDy2wYvQ=; b=FhVbvvMrq8cnc+/jXuKIJSOelK6547Aum3nEH9K0nMRwCJ80h90nOELFZimOrjWCJv X1f7NerSN8wrEvmgSMPwukRaTIFeqj1zYdhpSLup8yKoIpkc5F68py10fpI4wLtL1Mm8 tcIC/1myKCL79M1Xtpd9+La0GFMarNlDMHOlB8N1/GlFcSSigjbPIiV3/nzjcrfcyLX+ SkcfCPe9N5nzuflXaCL7vB6kuQI5RMTgvgH92Zso4fDNBrr+e2kTWBCmZ4C7jDKPlak9 F1simVjqr/PABC1popdlIcQwkjR4aO2x/2VgqN0pFgQ5KokbFkFgd4gw5/oPrammU+6x zfKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MdhxoOWgbfoIK7J887BWCJmXzmWQlPFixoBMDy2wYvQ=; b=ewjgtD1HfdaJs0zzPM4RiO5YMZTXn5mHbkKS9nKYherwDxQgJpXoxd5tC5X1cqituG 2hZHUvLXxOVZbPEhyNakLZ0wRTnTMirw+qvg0RQ9Dl8D23Sl4TSR/Vfuw/P/vfb6kQSE NI8oAtY5AuMep0f+gQyIP/E8TtISFhD0JepkTQVnQ9hlf8O1ZdQGZj4Fe7Xp9pfBerPr QRz6ZX6Mi6fA3r8lb3DFYHj9Il6XpMCG0d+aQwz44ZMpb9DAvh+iTO8bGHESZDB65S/a 7vDq97gk2JxFRjoTK/G6ygbQ8KWpDyOXDGl/Ok7LYJBb0cWH29R2f5idYlzXVFpmAmNp PHIg== X-Gm-Message-State: APjAAAXxU1xuQwRqXR4KCezHcTWKKB1vGfqkIrkhfjWKVJAEx3pI3nk7 pPcbjeTeI1AoDuGLidvmrj877zcU X-Google-Smtp-Source: APXvYqzPheXLVdDxqW8AZSihogeB2JxcBr4mutxCNMm2xN2HTW2XcyPT3HAUpG/OAUrAwJtS4vvdng== X-Received: by 2002:a05:660c:482:: with SMTP id a2mr23358155itk.91.1559740467981; Wed, 05 Jun 2019 06:14:27 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id u187sm7091718iod.37.2019.06.05.06.14.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2019 06:14:26 -0700 (PDT) From: Noam Postavsky To: Vincent Lefevre Subject: Re: bug#36092: 27.0.50; incorrect highlighting in nXML mode with ' and raw > characters References: <87zhmxie7n.fsf@vinc17.net> <874l544yva.fsf@gmail.com> <20190605112835.GA27320@cventin.lip.ens-lyon.fr> Date: Wed, 05 Jun 2019 09:14:26 -0400 In-Reply-To: <20190605112835.GA27320@cventin.lip.ens-lyon.fr> (Vincent Lefevre's message of "Wed, 5 Jun 2019 13:28:35 +0200") Message-ID: <87r2882mz1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 36092 Cc: Stefan Monnier , 36092@debbugs.gnu.org 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: -1.6 (-) tags 36092 fixed close 36092 quit Vincent Lefevre writes: > On 2019-06-04 21:48:19 -0400, Stefan Monnier wrote: >> I just install the patch below into `master` to address that. > > Thanks. Everything seems fine now. Okay, adding just the test case from patch my above and closing. 7ad5e3915f 2019-06-05T09:10:23-04:00 "; Add test for Bug#36092" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7ad5e3915fe0fad7c8053b53cab1aa7aa74193fe dec148939a 2019-06-05T07:29:23-04:00 "Do not use syntax-ppss-table in syntax-propertize when nil (Bug#36095)" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=dec148939aad8391875e73784af2bcb0a01100bb 0b3982b1a3 2019-06-04T21:48:06-04:00 "* lisp/emacs-lisp/syntax.el: Use syntax-ppss-table for syntax-propertize." https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0b3982b1a3892486fd9e4916b9cfafa12ddd9137 From unknown Fri Aug 15 14:46:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 04 Jul 2019 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator