From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: fill-paragraph: wrong behaviour after latex-environments Date: Sat, 05 May 2012 18:13:32 +0200 Message-ID: <87397efvwz.fsf@gmail.com> References: <87k40qsljb.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQhel-00060G-GT for emacs-orgmode@gnu.org; Sat, 05 May 2012 12:16:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQhej-0000XZ-KG for emacs-orgmode@gnu.org; Sat, 05 May 2012 12:16:27 -0400 In-Reply-To: <87k40qsljb.fsf@altern.org> (Bastien's message of "Sat, 05 May 2012 08:39:36 +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: Bastien Cc: emacs-orgmode@gnu.org, Benjamin Motz Hello, Bastien writes: > Benjamin Motz writes: > >> invoking fill-paragraph on the following org-code will delete the >> newline after \end{equation}: >> >> The relation >> \begin{equation} >> E=3Dmc^2 >> \end{equation} >> won't be further discussed here. >> >> This behaviour is undesirable because it makes the org-text less >> readable. Also, when adding '%' after \end{equation}, newline is still >> being deleted by fill-paragraph (and the text after '%' won't be >> exported e.g. by latex-export). > > There is `org-element-paragraph-separate', which already uses a=20 > better `paragraph-separate' value than the one currently in Org. > > Nicolas, do you think the default value for `paragraph-separate'=20 > in Org could use =CC=80org-element-paragraph-separate' in a way? > > How does org-element.el handles inline LaTeX code like the one=20 > Benjamin showed? org-element now provides a filling function for elements (org-element-fill-paragraph) which doesn't rely on `paragraph-separate' value. It needs testing, but it should do the right thing in most, if not all, cases. You can still use `org-element-paragraph-separate' as a value for `paragraph-separate' (provided all carets are removed first), but I don't think that would be useful. Regards, --=20 Nicolas Goaziou