Nicolas Goaziou <n.goaz...@gmail.com> wrote: > Daniel Hackney <d...@haxney.org> 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