Matt Beshara <m...@mfa.pw> writes:

> ‘org-fill-paragraph’ does not correctly handle ^L characters 
> (a.k.a. form feed, C-q C-l).  It should treat them as paragraph 
> separating whitespace, but instead treats them as any other 
> character which would appear in normal text.  Here is an example 
> to demonstrate the current behaviour:
>
> abc def
> ^L
> ghi jkl

This may or may not be a correct expectation.

Please remember that Org mode is a markup language.

^L is not a part of Org specification for paragraph separators.
According to https://orgmode.org/worg/dev/org-syntax.html#Paragraphs,
paragraph boundaries should either be empty lines, or beginning of other
Org elements.

> In org-mode, with point at the beginning or the end of the first 
> or last line, doing ‘org-fill-paragraph’ (M-q) should do nothing, 
> because the lines are already shorter than the fill-column.  What 
> really happens is that I end up with one line which looks like:
>
> abc def ^L def ghi

Which is correct wrt current Org syntax specification, although I do
agree that it is counter-intuitive.

Dear all,
Should we add page break (^L) to our syntax? It sounds like a reasonable
addition for a text-based markup.

> In text-mode, ‘fill-paragraph’ does handle ^L characters 
> correctly, and pressing M-q anywhere in the first example results 
> in no change being made to the buffer.

Indeed. That's because text mode syntax is treated ^L specially.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92

Reply via email to