Hi, Nicolas Goaziou writes: > Rasmus writes: > >> I changed a couple of things, > > A couple of things? AFAIU, it only requires to change the regexp in > `org-element-latex-environment-parser', doesn't it? Turns out that I also had to modify the regexp in org-element--current-element as this kicks off org-element-latex-environment-parser (correct me if I am wrong). In the patch I define new regexps and use them everywhere. Org-element.el seems to rather use spelled-out regexps. If desirable, I can use this practice rather than defining new regexps. [BTW: Is there a way to test performance systematically?] The change in org-element-paragraph-parser, namely using the mentioned regexp, may be redundant. I have added tests on new newline behavior as well as a test on different begin and end tags. The latter could be moved to a separate commit or entirely dropped (but it is in the org-syntax document). This patch does not change the manual as I did not find any direct discussion of newlines and LaTeX environments. I do not change the syntax document, as it seems to only live on Worg (different rope). Cheers, Rasmus -- May contains speling mistake