From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions starting and ending a line Date: Sat, 09 Aug 2014 10:00:11 +0200 Message-ID: <87tx5mxfck.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XG1Yy-0005Un-18 for emacs-orgmode@gnu.org; Sat, 09 Aug 2014 03:59:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XG1Yq-0008W9-IC for emacs-orgmode@gnu.org; Sat, 09 Aug 2014 03:59:39 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:54345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XG1Yq-0008W3-Bw for emacs-orgmode@gnu.org; Sat, 09 Aug 2014 03:59:32 -0400 In-Reply-To: (Federico Beffa's message of "Tue, 5 Aug 2014 23:45:03 +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: Federico Beffa Cc: emacs-orgmode@gnu.org, rasmus@gmx.us Hello, Federico Beffa writes: > OK, I understand that the Cons above is a serious issue and nobody wants it. > For this reason I went back to my original idea and modified the > `org-fill-paragraph' function. This provides the two Pros above > without having to introduce the undesired Cons. The behavior is a > follows: > - if \[...\] is inline, behave as before. > - if \[ is the first non space character of a line and the closing \] > is the last non space character of a line (possibly spanning several > lines), then do not fill this region of the paragraph. But then, you introduce a discrepancy between M-q results and Org syntax. This is not optimal either. Also, this will not be consistent anyway with \begin{...} ... \end{...} markup, which is handled differently, unlike to LaTeX. > Attached you find a patch with the proposed modification. I would > greatly appreciate if you could consider it for inclusion in org-mode > and provide feedback. Note that you should use master to provide patches. `org-fill-paragraph' was modified recently. Regards, -- Nicolas Goaziou