From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Hackney Subject: Re: [BUG] `org-fill-paragraph' doesn't use `fill-prefix' Date: Sat, 27 Jul 2013 17:15:13 -0400 Message-ID: References: <874nbf3f6q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3Bpy-0001C0-9e for emacs-orgmode@gnu.org; Sat, 27 Jul 2013 17:15:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3Bpv-0007xd-AC for emacs-orgmode@gnu.org; Sat, 27 Jul 2013 17:15:38 -0400 Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:51599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3Bpv-0007xI-1d for emacs-orgmode@gnu.org; Sat, 27 Jul 2013 17:15:35 -0400 Received: by mail-ob0-f180.google.com with SMTP id eh20so6624163obb.25 for ; Sat, 27 Jul 2013 14:15:34 -0700 (PDT) In-Reply-To: <874nbf3f6q.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Nicolas Goaziou wrote: > Daniel Hackney writes: > >> I proposed a fix [1] for this back in 2010, but it seems to have regressed >> again. `org-fill-paragraph' no longer makes use of a `fill-prefix', so >> filling things like email comments no longer works. > > It has been discussed on this ML already. Org mode is not Message mode > and ">" prefix means nothing to it. It isn't just ">" that behaves this way in `fundamental-mode' and older versions of org-mode; there are a number of such characters. From a quick test, in Emacs 24.2, #+BEGIN_EXAMPLE -- foo -- bar #+END_EXAMPLE becomes #+BEGIN_EXAMPLE -- foo bar #+END_EXAMPLE whereas in the current org-mode, it is #+BEGIN_EXAMPLE -- foo -- bar #+END_EXAMPLE Same with #+BEGIN_EXAMPLE ! foo ! bar #+END_EXAMPLE and #+BEGIN_EXAMPLE % foo % bar #+END_EXAMPLE The following also fill to a single line: #+BEGIN_EXAMPLE % % foo % % bar ! ! foo ! ! bar #+END_EXAMPLE >From a brief look at `fill-paragraph', the relevant code is in `fill-comment-paragraph'. I might take a closer look at it to see if I can come up with my own fix. > Also, it has its own set of special prefixes, which are not found in > Fundamental mode. For example, you can never have " : " as a fill prefix > since it creates a fixed-width area. Of course. Fundamental mode will fill #+BEGIN_EXAMPLE - foo - bar #+END_EXAMPLE into a single line, but org-mode never did. I'm not asking for new behavior, simply the `fill-paragraph' style of org 7.8.11 back. > Therefore, I don't consider it to be a regression since it's not an > expected feature in the first place. But I admit it is still > convenient. Well, my patch from 2010 /was/ applied [1], so I would consider it an expected feature :) > Maybe we can introduce some support for `adaptive-fill-regexp' in > paragraphs and comments filling. Would you mind testing the following > patch? I'll test it later today. [1] http://article.gmane.org/gmane.emacs.orgmode/22954 -- Daniel Hackney