From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: [PATCH] org.el: make org-paragraph-fill ignore \[...\] regions starting and ending a line Date: Sat, 16 Aug 2014 09:38:29 +0200 Message-ID: References: <87mwbbp45b.fsf@nicolasgoaziou.fr> <87ppg6bvzd.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=14dae9d7c884616f490500ba393b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIYZL-0006Wb-TS for emacs-orgmode@gnu.org; Sat, 16 Aug 2014 03:38:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIYZL-0000pR-0r for emacs-orgmode@gnu.org; Sat, 16 Aug 2014 03:38:31 -0400 Received: from mail-yk0-x234.google.com ([2607:f8b0:4002:c07::234]:63756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIYZK-0000pI-R1 for emacs-orgmode@gnu.org; Sat, 16 Aug 2014 03:38:30 -0400 Received: by mail-yk0-f180.google.com with SMTP id 200so2803263ykr.39 for ; Sat, 16 Aug 2014 00:38:30 -0700 (PDT) In-Reply-To: <87ppg6bvzd.fsf@nicolasgoaziou.fr> 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: emacs-orgmode@gnu.org, Rasmus , Nicolas Goaziou --14dae9d7c884616f490500ba393b Content-Type: text/plain; charset=UTF-8 On Mon, Aug 11, 2014 at 10:40 PM, Nicolas Goaziou > I'm just pointing out an ergonomy (or consistency) annoyance in your > proposal. I'm not thrilled by faking the filling mechanism. Well, that has nothing to do with consistency (neither with ergonomy, unless you produce a large scale statistical study on the subject). First, the proposed change modifies a user function which is not supposed to be used as debugging tool for the parsing of a document. For that you have other tools. Second, the modified function still fills the whole paragraph and does not stop at a \[...\] block. It just does not scramble the content of such a block. It's really a matter of opinions: you perceive this as introducing an "inconsistency". I see this as adapting a function to better suit the situation. And, given that latex-mode behaves in the same way, I'm for sure not the only one looking at this in this way. In any case, I've updated my git repository (less than 24h ago) and recreated the patch. I've tested it and believe it is working. Why don't you give it a try. It's not such a disruptive change. Regards, Fede --14dae9d7c884616f490500ba393b Content-Type: application/octet-stream; name="0001-org.el-make-org-paragraph-fill-ignore-.-regions-star.patch" Content-Disposition: attachment; filename="0001-org.el-make-org-paragraph-fill-ignore-.-regions-star.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hywmr8uk0 RnJvbSA3YzNkZmNhMGQzZWE0NDdiZmQ0MGY4MTBhMTk3NjM1YjFiY2E5ZTg2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGZWRlcmljbyBCZWZmYSA8YmVmZmFAZmJlbmdpbmVlcmluZy5j aD4KRGF0ZTogVHVlLCA1IEF1ZyAyMDE0IDIzOjA4OjI2ICswMjAwClN1YmplY3Q6IFtQQVRDSF0g b3JnLmVsOiBtYWtlIG9yZy1wYXJhZ3JhcGgtZmlsbCBpZ25vcmUgXFsuLi5cXSByZWdpb25zCiBz dGFydGluZyBhbmQgZW5kaW5nIGEgbGluZQoKKiBsaXNwL29yZy5lbCAob3JnLXBhcmFncmFwaC1m aWxsKTogSWYgYSBMYVRlWCBcWy4uLlxdIG1hY3JvIHN0YXJ0cwphIGxpbmUgYW5kIGVuZHMgYSBs aW5lIChwb3NzaWJseSBzcGFubmluZyBtdWx0aXBsZSBsaW5lcyksIHRoZW4gZG8gbm90CmNoYW5n ZSB0aGF0IHBhcnQgb2YgdGhlIHBhcmFncmFwaC4KLS0tCiBsaXNwL29yZy5lbCB8ICAxMTYgKysr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrLS0tLS0tLS0K I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