GNU bug report logs -
#78561
[PATCH] Add semantic linefeed support for paragraph filling
Previous Next
Reported by: Roi Martin <jroi.martin <at> gmail.com>
Date: Fri, 23 May 2025 09:59:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #151 received at 78561 <at> debbugs.gnu.org (full text, mbox):
>> If you want to pay attention to hard-newlines, yet also pay attention to
>> other "paragraph separator hints", then hopefully
>> `fill-paragraph-forward-function` can do the trick. E.g. I can't see
>> any reason why Org couldn't set `fill-paragraph-forward-function` to
>> a function which uses both regexps and the `hard` text-property to
>> determine paragraph boundaries.
>
> This is simple. fill-region has
>
> (if use-hard-newlines
> (progn ...)
> (fill-forward-paragraph 1)
> (setq end (min max (point)))
> (fill-forward-paragraph -1))
>
> So, `fill-forward-paragraph-function' is currently ignored when
> use-hard-newlines is non-nil.
Duh, right.
> What I am asking is a way for major modes to customize boundaries even
> when use-hard-newlines is non-nil.
I have the impression that The Right Thing would be for `fill-region`
to always use `fill-forward-paragraph`, and then for the default value
of `fill-forward-paragraph` to check `use-hard-newlines`.
I haven't looked at the code to make sure The Right Thing is compatible
with The Real World, tho.
Stefan
This bug report was last modified 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.