Hello, Rasmus <ras...@gmx.us> 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? [...] > 2. Load my modified org-element.el file and rerun tests. > The only new fail is this one, that is to be expected to fail. > > (should-not > (eq 'latex-environment > (org-test-with-temp-text "\\begin{env}{arg} > something\nvalue\n\\end{env}" > (org-element-type (org-element-at-point))))) OK. > Hence, my question is: Can I now assume that my modification are now > somewhat safe wrt. the current Org syntax? You should also add tests specifics to the new behaviour. > I have a case that I worry a bit about, namely broken LaTeX code with > mismatching no. of begin/end tags: > > Consider: > > #+begin_src org > \begin{equation} x^2_3 > \begin{equation} x^2_3 \end{equation} > #+end_src > > With my patch, this will produce (*): > > #+begin_src latex > \begin{equation} x^2_3 > \begin{equation} x^2_3 \end{equation} > #+end_src latex This looks "correct". It is a valid latex-environment element even though it is not valid LaTeX syntax. > I will write some tests and review the two documents you mention and > submit a patch ASAP. OK. Thank you for that. Regards, -- Nicolas Goaziou