From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [bug?, org-element] latex-environment delimiters must be at BOL
Date: Tue, 22 Jul 2014 12:03:45 +0200 [thread overview]
Message-ID: <87d2cxg16m.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87fvhtlq0p.fsf@gmx.us> (rasmus@gmx.us's message of "Tue, 22 Jul 2014 11:08:22 +0200")
Rasmus <rasmus@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
next prev parent reply other threads:[~2014-07-22 10:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 11:54 [bug?, org-element] latex-environment delimiters must be at BOL Rasmus
2014-07-16 13:04 ` Nicolas Goaziou
2014-07-18 15:49 ` Rasmus
2014-07-20 17:49 ` Nicolas Goaziou
2014-07-21 9:29 ` Rasmus
2014-07-22 7:54 ` Nicolas Goaziou
2014-07-22 9:08 ` Rasmus
2014-07-22 10:03 ` Nicolas Goaziou [this message]
2014-07-22 13:28 ` Rasmus
2014-07-23 8:29 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2cxg16m.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=rasmus@gmx.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.