From: Eli Zaretskii <eliz@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: salutis@me.com, 68418@debbugs.gnu.org, rustand.lars@gmail.com
Subject: bug#68418: refill-mode interferes with org-mode headlines
Date: Sat, 13 Jan 2024 15:43:22 +0200 [thread overview]
Message-ID: <835xzxgxhh.fsf@gnu.org> (raw)
In-Reply-To: <87mst9uzv3.fsf@localhost> (message from Ihor Radchenko on Sat, 13 Jan 2024 13:28:16 +0000)
> 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?
next prev parent reply other threads:[~2024-01-13 13:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 20:18 bug#68418: refill-mode interferes with org-mode headlines Lars Rustand
2024-01-13 8:19 ` Eli Zaretskii
2024-01-13 9:01 ` Lars Rustand
2024-01-13 9:16 ` Eli Zaretskii
2024-01-27 8:55 ` Eli Zaretskii
2024-01-13 13:28 ` Ihor Radchenko
2024-01-13 13:43 ` Eli Zaretskii [this message]
2024-01-13 13:56 ` Ihor Radchenko
2024-01-13 15:13 ` Eli Zaretskii
2024-01-13 15:26 ` Ihor Radchenko
2024-01-13 15:57 ` Eli Zaretskii
2024-01-13 18:37 ` Ihor Radchenko
2024-01-13 19:00 ` Eli Zaretskii
2024-01-13 19:13 ` Ihor Radchenko
2024-01-13 19:21 ` Eli Zaretskii
2024-01-13 19:33 ` Ihor Radchenko
2024-01-13 19:57 ` Eli Zaretskii
2024-01-13 20:11 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=835xzxgxhh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=68418@debbugs.gnu.org \
--cc=rustand.lars@gmail.com \
--cc=salutis@me.com \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).