GNU bug report logs -
#68418
refill-mode interferes with org-mode headlines
Previous Next
Full log
Message #22 received at 68418 <at> debbugs.gnu.org (full text, mbox):
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: Lars Rustand <rustand.lars <at> gmail.com>, Rudolf Adamkovič
> <salutis <at> me.com>, 68418 <at> debbugs.gnu.org
> Date: Sat, 13 Jan 2024 13:28:16 +0000
>
> This is a bit tangent, but the current design of filling feels chaotic -
> we have configurable fill-paragraph-function and
> fill-forward-paragraph-function, while `fill-region-as-paragraph' is
> hard-coded. And forward-paragraph relies upon regexps...
>
> It looks like the notion of paragraph when filling is designed to be
> different compared to the notion of paragraph in `forward-paragraph'.
> Is there any reason for such difference?
I don't know.
> This looks like an improvement. Also, it appears to fix the original
> reproducer.
>
> However, there will still be a problem, even with the proposed patch, in
> the following scenario:
>
> 1. emacs -Q
> 2. Open a new org file
> * Heading <point> :tag:
> 3. M-x refill-mode
> 4. Keep typing
> * Heading alksjd alkjasd asldkj asdlkj aslldkj aslkdj asldkj
> asldkj <point>:tag:
>
> See how the heading is split into multiple lines.
>
> This happens because refill-mode uses `fill-region-as-paragraph', which
> is impossible to configure by major modes.
> As the above example demonstrates, not everything is safe to fill
> without breaking the markup.
>
> A similar problem appears in `fill-region' - it completely disregards
> `fill-paragraph-function' and always calls `fill-region-as-paragraph'.
So you think the patch I posted should not be installed, and we should
wait for a more thorough solution?
This bug report was last modified 1 year and 140 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.