emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] `org-fill-paragraph' doesn't respect formatting


From: Ihor Radchenko
Subject: Re: [BUG] `org-fill-paragraph' doesn't respect formatting
Date: Thu, 06 Oct 2022 16:55:03 +0800

Tor Kringeland <tor.a.s.kringeland@ntnu.no> writes:

> Applying `org-fill-paragraph' to /e.g./
>
>   /Some text./  Some more text.
>
> when `sentence-end-double-space' is t removes the double space to a
> single space.  The same happens with other formatting like *bold* and
> _underline_.  In other instances it is more context aware.  /E.g./
> applying it to
>
>   (Some text.)  Some more text.
>
> does nothing, which is correct.

This is because Org does not set sentence-end-base to include the markup
markers.

The easiest way to fix this bug will be setting sentence-end-base.
However, in addition to fixing the particular case in this bug report,
such change may have unforeseen consequences in other scenarios.

We may be more selective and only allow the actual parsed emphasis end
markers to be recognized as sentence end.

Or I may be overthinking things because
`org-mode-transpose-word-syntax-table' is already using indiscriminate
approach wrt treating the emphasis barely shielding emphasis additions
to specific commands (like in `org-fill-element').

WDYT?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]