Rasmus <ras...@gmx.us> writes:

> The attached patch hopefully addresses all of the issues you pointed
> out.  Sorry about those typos before!

Thanks for the update. Some more comments below.

> +(defconst org-element--latex-begin-environment
> +  "^[ \t]*\\\\begin{\\([A-Za-z0-9*]+\\)}"

I overlooked this in the previous patch. This regexp is not correct, as
it matches, e.g.

  \begin{ab*cd}

A more accurate regexp is

  "^[ \t]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}"

I realize that `org-element--current-element' is wrong here. I fixed it
in maint, which probably means that you will need to deal with a merge
conflict.

> +  ;; The following format string also matches optional arguments:
> +  ;; "^[ \t]*\\\\begin{\\([A-Za-z0-9*]+\\)}\\(\\[.*?\\]\\|{.*?}\\)*[ \t]*?"

I think this comment is not necessary.

> +  "Format string matching the beginning of a LaTeX environment.
> +
> +Usage example:
> +  (format org-element--latex-begin-environment ENV)
> +where ENV is a LaTeX environment.

`org-element--latex-begin-environment' is not a format string.
`org-element--latex-end-environment' is.

You can remove this part. Add that the environment is put in group 1,
though.

Otherwise, the patch looks good. Feel free to apply it with suggested
changes.


Regards,

-- 
Nicolas Goaziou

Reply via email to