Stefan Monnier <[email protected]> writes: >> fill-region-as-paragraph is an interactive function. >> It is very strange for me that calling it interactively requires the >> user to select region within a single paragraph and nothing >> else. > > I think even the above statement is the result of a misunderstanding: > the region passed to `fill-region-as-paragraph` can be *anything*. > It should just correspond to what the user wants to treat as > a single paragraph. IOW, it's used specifically when the "builtin" > notion of paragraph doesn't match what the user needs.
But earlier you said that "it's the responsibility of the caller to make sure the region is indeed a fillable paragraph" Either these two statements contradict each other or I am missing something. >> Especially "regardless what ... human brain looking at this may think". >> If Emacs command is counter-intuitive, what kind of command is it? > > What behavior would you find more intuitive? > IOW, how would you change its behavior to make it more intuitive? Given that I do not quite understand the intended API and behavior, I have no clue what would be more intuitive. I just don't understand the current design well enough. >> (defun fill-region-as-paragraph-semlf (from to &optional justify >> nosqueeze squeeze-after) >> "Fill the region using semantic linefeeds as if it were a single >> paragraph. >> This command removes any paragraph breaks in the region and extra >> newlines at the end, and fills lines within the region. > > I can't see anywhere here where it says it "might be called on multiple > paragraphs". Maybe you're referring to the last two lines, Yes. -- Ihor Radchenko // yantar92, Org mode maintainer, 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>
