From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [POLL] Syntax change: make \[...\] non-inline (+1) Date: Sat, 02 Aug 2014 21:12:57 +0200 Message-ID: <8761iahfie.fsf@nicolasgoaziou.fr> References: <877g2t3nox.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDejA-0001Cl-1r for emacs-orgmode@gnu.org; Sat, 02 Aug 2014 15:12:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDej1-0005uL-Vp for emacs-orgmode@gnu.org; Sat, 02 Aug 2014 15:12:23 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:43764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDej1-0005sz-Om for emacs-orgmode@gnu.org; Sat, 02 Aug 2014 15:12:15 -0400 In-Reply-To: <877g2t3nox.fsf@gmx.us> (rasmus@gmx.us's message of "Thu, 31 Jul 2014 10:03:10 +0100") 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: > It works sensibly in latex-mode. If your text is > > My displayed \[equation\] > is here > > M-q will make it > > My displayed \[equation\] is here > > But > > My displayed > \[equation\] > is here > > Is unaltered by M-q (though it was not obvious to me how tex-mode.el > implemented this). > > I didn't read the other thread is details, but it seems the most > sensible thing to do is alter the org fill function(s). These seems > to rely on org-element, though, and I'm guessing that is why a syntax > change is necessary, yes? As explained in the original thread, this is not quite possible. Unlike to LaTeX, Org puts a strong emphasis on the difference between inline and non-inline blocks. You can write #+begin_center contents #+end_center but not #+begin_center contents #+end_center As you know, it doesn't matter much in LaTeX, \begin{equation} contents \end{equation} is as fine as \begin{equation} contents \end{equation} Of course, it would be possible to add extra code in filling functions (and more) to mimic this behaviour, but that would really go against the syntax. Org is not LaTeX, nor it is meant to mimic it. \[...\] are either inline or not, like every other construct. In the first case, M-q will fill them within a paragraph. In the second case, it will not be possible to have \[...\] in the middle of the line. Hence the poll. IMO, filling \[...\] is a minor issue since you can write, e.g., \begin{displaymath} ... \end{displaymath} when you absolutely don't want M-q to be active. There is no strong incentive to alter syntax or filling functions. Regards, -- Nicolas Goaziou