bug#22146: Stack overflow in reftex-parse-all
Hi Nils, 2015-12-11 22:03 GMT+01:00 Nils Kanning: > Dear all, > > I encounter the error "Stack overflow in regexp matcher" if I apply the > function reftex-parse-all to the following file: > > \documentclass{article} > \begin{document} > [\} > foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo > ... > foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo > \end{document} > > Here ... stands for 500 copies of the line above. The file can be > compiled successfully with pdflatex. > > I am using the Debian packages emacs24 24.5+1-3 and auctex 11.88-1.1. > The same error also occurs with different versions. We've recently released AUCTeX 11.89, you can grab it from ELPA ;-) > In case you are wondering, the non-matching brackets [\} appear for > example in physics as so-called "super Lie brackets". Thanks for taking the time to report this bug, I can reproduce it. The culprit is the (re-search-forward (reftex-everything-regexp) nil t) within the `reftex-with-special-syntax' macro in `reftex-parse-from-file' function. Actually in the code it is called as (re-search-forward regexp nil t) I wrote the above line for ease of reproduction. Of course `reftex-everything-regexp' is an undocumented function that returns one of two undocumented variables. I can reproduce the bug only if `reftex-support-index' is non-nil, so in the end the culprit is `reftex-everything-regexp'. There is a simple workaround you can put in your code: close the brackets, also in a comment is fine: [\} % ] But I don't know how to really fix the bug, it's too late for me to decrypt that regexp now. Having a clue of what it should *exactly* match would be of great help. Bye, Mosè ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#22146: Stack overflow in reftex-parse-all
Dear all, I encounter the error "Stack overflow in regexp matcher" if I apply the function reftex-parse-all to the following file: \documentclass{article} \begin{document} [\} foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo ... foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo \end{document} Here ... stands for 500 copies of the line above. The file can be compiled successfully with pdflatex. I am using the Debian packages emacs24 24.5+1-3 and auctex 11.88-1.1. The same error also occurs with different versions. In case you are wondering, the non-matching brackets [\} appear for example in physics as so-called "super Lie brackets". Best Nils ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#22146: Stack overflow in reftex-parse-all
Mosè Giordanowrites: Hi Nils & Mosé, >> In case you are wondering, the non-matching brackets [\} appear for >> example in physics as so-called "super Lie brackets". > > Thanks for taking the time to report this bug, I can reproduce it. I can reproduce it with Emacs 24.5 but not with Emacs 25.0.50.16 from the current emacs-25 branch. So maybe it has been fixed after the last release (either the regex, or the Emacs regex matcher has become better). If anyone of you could try with Emacs 25 and report back, that'd be great. > There is a simple workaround you can put in your code: close the > brackets, also in a comment is fine: > > [\} % ] > > But I don't know how to really fix the bug, it's too late for me to > decrypt that regexp now. Having a clue of what it should *exactly* > match would be of great help. Obviously, it should match everything that's interesting to reftex. :-) But seriously, have a look at the bottom of `reftex-compile-variables' where `reftex-everything-regexp' is composed from several other regexes with more local scopes, e.g., one for matching labels, one for sections, one for index entries, etc. Bye, Tassilo ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex