[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33887: 26.1; Emacs hangs for several seconds when going to the end o
From: |
Noam Postavsky |
Subject: |
bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode |
Date: |
Mon, 20 May 2019 16:47:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
> There's an issue with the following XML file, which does not have
> any special character, except a single quote in the middle of the
> text.
>
> <root>
> <a>12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789'012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
> </a>
> </root>
>
> Note that the newline character before the </a> is important.
Right, this is due to chunking by syntax-propertize. Here's the fix:
0001-Handle-lone-quote-500-characters-away-from-XML-tag-B.patch
Description: patch
Note that you have to be sure to recompile sgml-mode.el AND nxml-mode.el
after applying these patches, 'make' isn't smart enough to do it
automatically (yes, I figured this out the hard way).
>> <t>>1</t>
>>
>> (syntax-ppss) on the location of "1" in the above, gives (-1 ...). And
>> then (syntax-ppss) on the "/" will give (0 ...). So the syntax
>> propertize rule for quote use of (zerop (car (syntax-ppss))) no longer
>> works correctly to see whether it's inside or outside a tag.
>>
>> ">" outside of tags should be set to syntax ".", but I would assume that
>> adding a syntax-propertize rule which calls syntax-ppss for every ">"
>> (to check whether it's inside a tag or not) will be very slow, just like
>> calling it for every quote was.
Oh, I figured it out, we can just look at (nth 9 ppss), because the list
of open parens is still okay, regardless of unmatched close parens.
0002-Handle-outside-SGML-XML-tags-Bug-33887.patch
Description: patch
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, (continued)
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Noam Postavsky, 2019/05/18
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Vincent Lefevre, 2019/05/18
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Noam Postavsky, 2019/05/19
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Stefan Monnier, 2019/05/19
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Noam Postavsky, 2019/05/19
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Stefan Monnier, 2019/05/19
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode,
Noam Postavsky <=
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Vincent Lefevre, 2019/05/20
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Noam Postavsky, 2019/05/21
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Stefan Monnier, 2019/05/22
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Vincent Lefevre, 2019/05/22
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Stefan Monnier, 2019/05/22
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Stefan Monnier, 2019/05/22
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Noam Postavsky, 2019/05/26
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Vincent Lefevre, 2019/05/27
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Noam Postavsky, 2019/05/27
- bug#33887: 26.1; Emacs hangs for several seconds when going to the end of an XML file in nXML mode, Vincent Lefevre, 2019/05/28