[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68418: refill-mode interferes with org-mode headlines
From: |
Eli Zaretskii |
Subject: |
bug#68418: refill-mode interferes with org-mode headlines |
Date: |
Sat, 13 Jan 2024 15:43:22 +0200 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: Lars Rustand <rustand.lars@gmail.com>, Rudolf Adamkovič
> <salutis@me.com>, 68418@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?
- bug#68418: refill-mode interferes with org-mode headlines, Lars Rustand, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Eli Zaretskii, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Lars Rustand, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Ihor Radchenko, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines,
Eli Zaretskii <=
- bug#68418: refill-mode interferes with org-mode headlines, Ihor Radchenko, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Eli Zaretskii, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Ihor Radchenko, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Eli Zaretskii, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Ihor Radchenko, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Eli Zaretskii, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Ihor Radchenko, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Eli Zaretskii, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Ihor Radchenko, 2024/01/13
- bug#68418: refill-mode interferes with org-mode headlines, Eli Zaretskii, 2024/01/13