emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL


From: Nicolas Goaziou
Subject: Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL
Date: Tue, 22 Jul 2014 12:03:45 +0200

Rasmus <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]