Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

> Hello,
>
> Eric Abrahamsen <e...@ericabrahamsen.net> writes:
>
>> And just for the heck of it, here's another patch that does it with
>> narrowing.
>
> Thanks for the patch.
>
> However, I don't think it belongs to `org-adaptive-fill-function' to
> handle this. All this Message mode processing should probably be
> delegated to the orgstruct level.

Makes sense!

If we really want to get all the message-specific stuff refactored into
orgstruct++ mode, I guess we could (in the `orgstruct++-mode' function)
bind `normal-auto-fill-function' and `adaptive-fill-function' to new
functions, which first check for message-mode specific stuff (and any
other modes that need to be handled), then delegate to
`org-auto-fill-function' and `org-adaptive-fill-function'.

Actually, all `org-auto-fill-function' does is conditionally call
`org-adaptive-fill-function', so maybe we could just have one new
function, `orgstruct++-auto-fill-function', that does everything.

How does that sound?

Eric


Reply via email to