org-element parses the following (correctly) as a `latex-environment' element:
\begin{align} x = 1 \end{align} As verified by placing the cursor anywhere in that text block and calling (org-element-context). If I delete the last line, so it looks like \begin{align} x = 1 And now place the cursor anywhere on the first line (with the \begin...) and call (org-element-context), it parses it as a `latex-fragment'. This make sense too, since any text of the form \NAME BRACKETS is a `latex-fragment' as per Org syntax. Is there a way to temporarily suppress this latter behavior while parsing? This is required for handling an edge case with live-updating LaTeX previews where the end delimiter of a latex-environment (\end{foo}) is modified. Currently I'm rejecting the classification of an element as a LaTeX fragment if it begins with \begin or \end, but I think this creates edge cases of its own. Karthik