From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug?, org-element] latex-environment delimiters must be at BOL Date: Sun, 20 Jul 2014 19:49:28 +0200 Message-ID: <87mwc3gbtj.fsf@nicolasgoaziou.fr> References: <877g3ltomt.fsf@gmx.us> <87iomxjvyv.fsf@nicolasgoaziou.fr> <87vbqu1xb6.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8vEJ-0001Wl-6Q for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 13:49:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8vEB-0007qd-3T for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 13:48:59 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:36502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8vEA-0007pv-TQ for emacs-orgmode@gnu.org; Sun, 20 Jul 2014 13:48:51 -0400 In-Reply-To: <87vbqu1xb6.fsf@gmx.us> (rasmus@gmx.us's message of "Fri, 18 Jul 2014 17:49:49 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org Hello, Rasmus 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