GNU bug report logs - #46416
27.1; syntax-propertize fails in mhtml-mode

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Wed, 10 Feb 2021 01:42:02 UTC

Severity: normal

Found in version 27.1

To reply to this bug, email your comments to 46416 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Wed, 10 Feb 2021 01:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 10 Feb 2021 01:42:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; syntax-propertize fails in mhtml-mode
Date: Wed, 10 Feb 2021 09:40:55 +0800
[Message part 1 (text/plain, inline)]
1. emacs -q -l test.el
2. Create a new buffer in mhtml-mode
3. Add the following two lines:

   %%var1%%
   "%%var2%%"

4. Inspect the syntax of the % char (C-u C-x =) on both lines

% in double quotes has word syntax which seems unexpected.

If we do something similar in Emacs 26 both % chars have punctuation
syntax.

[test.el (application/emacs-lisp, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Sun, 14 Feb 2021 01:26:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Leo Liu <sdl.web <at> gmail.com>, 46416 <at> debbugs.gnu.org
Subject: Re: bug#46416: 27.1; syntax-propertize fails in mhtml-mode
Date: Sun, 14 Feb 2021 03:25:34 +0200
On 10.02.2021 03:40, Leo Liu wrote:
> 1. emacs -q -l test.el
> 2. Create a new buffer in mhtml-mode
> 3. Add the following two lines:
> 
>     %%var1%%
>     "%%var2%%"
> 
> 4. Inspect the syntax of the % char (C-u C-x =) on both lines
> 
> % in double quotes has word syntax which seems unexpected.
> 
> If we do something similar in Emacs 26 both % chars have punctuation
> syntax.

I can't seem to be able to reproduce your scenario in Emacs 28 (in fact, 
I get %var1 and %var2 highlighted as variables), but it might be related 
to the

  "\\([\"']\\)[^\"'<>]*"

rule in sgml-syntax-propertize-rules.

If you could double-check the expected and actual behaviors in the 
current master, though, that would be great.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Sun, 14 Feb 2021 05:17:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 46416 <at> debbugs.gnu.org
Subject: Re: bug#46416: 27.1; syntax-propertize fails in mhtml-mode
Date: Sun, 14 Feb 2021 13:15:50 +0800
On 2021-02-14 03:25 +0200, Dmitry Gutov wrote:
> I can't seem to be able to reproduce your scenario in Emacs 28 (in
> fact, I get %var1 and %var2 highlighted as variables), but it might be
> related to the
>
>   "\\([\"']\\)[^\"'<>]*"
>
> rule in sgml-syntax-propertize-rules.

Yes I can confirm it's this rule that seems to remove syntax-table
property that has been applied by preceding rules.

I can reproduce this bug by simplifying the said rule to

  ("\\([\"']\\)[^\"'<>]*" (1 "."))

> If you could double-check the expected and actual behaviors in the
> current master, though, that would be great.

Unfortunately I don't have emacs 28 at hand so cannot test immediately.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Thu, 16 Jun 2022 14:25:03 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 46416 <at> debbugs.gnu.org
Subject: Re: bug#46416: 27.1; syntax-propertize fails in mhtml-mode
Date: Thu, 16 Jun 2022 16:24:11 +0200
Leo Liu <sdl.web <at> gmail.com> writes:

> 1. emacs -q -l test.el
> 2. Create a new buffer in mhtml-mode
> 3. Add the following two lines:
>
>    %%var1%%
>    "%%var2%%"
>
> 4. Inspect the syntax of the % char (C-u C-x =) on both lines
>
> % in double quotes has word syntax which seems unexpected.

I'm unable to reproduce this -- all the % signs have

  general-category: Po (Punctuation, Other)

syntax, as far as I can tell (both in Emacs 27.1 and 29).  So I seem to
be unable to reproduce this problem.  Are you still seeing this in
recent Emacs versions, and if so, do you have a complete recipe to
reproduce it?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 16 Jun 2022 14:25:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Wed, 22 Jun 2022 06:12:01 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46416 <at> debbugs.gnu.org
Subject: Re: bug#46416: 27.1; syntax-propertize fails in mhtml-mode
Date: Wed, 22 Jun 2022 14:11:33 +0800
> I'm unable to reproduce this -- all the % signs have
> 
>  general-category: Po (Punctuation, Other)
> 
> syntax, as far as I can tell (both in Emacs 27.1 and 29).  So I seem to
> be unable to reproduce this problem.  Are you still seeing this in
> recent Emacs versions, and if so, do you have a complete recipe to
> reproduce it?
> 

I tested the bug again in emacs 28.1 nothing seems to have changed 

               syntax: w 	which means: word

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Thu, 23 Jun 2022 08:44:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 46416 <at> debbugs.gnu.org
Subject: Re: bug#46416: 27.1; syntax-propertize fails in mhtml-mode
Date: Thu, 23 Jun 2022 10:43:26 +0200
Leo Liu <sdl.web <at> gmail.com> writes:

>> I'm unable to reproduce this -- all the % signs have
>> 
>>  general-category: Po (Punctuation, Other)
>> 
>> syntax, as far as I can tell (both in Emacs 27.1 and 29).  So I seem to
>> be unable to reproduce this problem.  Are you still seeing this in
>> recent Emacs versions, and if so, do you have a complete recipe to
>> reproduce it?
>> 
>
> I tested the bug again in emacs 28.1 nothing seems to have changed 
>
>                syntax: w 	which means: word

Do you have a complete recipe, starting from "emacs -Q", to reproduce
this?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Sun, 26 Jun 2022 10:48:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#46416: 27.1; syntax-propertize fails in mhtml-mode
Date: Sun, 26 Jun 2022 18:47:15 +0800
On 2022-06-23 10:43 +0200, Lars Ingebrigtsen wrote:
> Do you have a complete recipe, starting from "emacs -Q", to reproduce
> this?

That's what I did following step by step in the bug report. However I
noticed you were posting from the subheading "Character code properties"
in the output of C-u C-x =. I was taking the output from the top under
key "syntax:". Is this causing the confusion?

Leo





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46416; Package emacs. (Sun, 26 Jun 2022 15:52:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 46416 <at> debbugs.gnu.org
Subject: Re: bug#46416: 27.1; syntax-propertize fails in mhtml-mode
Date: Sun, 26 Jun 2022 17:51:33 +0200
Leo Liu <sdl.web <at> gmail.com> writes:

> That's what I did following step by step in the bug report. However I
> noticed you were posting from the subheading "Character code properties"
> in the output of C-u C-x =. I was taking the output from the top under
> key "syntax:". Is this causing the confusion?

Oh, you mean this?

               syntax: w 	which means: word

Yes, I can reproduce that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Jul 2022 10:01:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 54 days ago.

Previous Next


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