emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Tor Kringeland <tor.a.s.kringeland@ntnu.no>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] `org-fill-paragraph' doesn't respect formatting
Date: Thu, 06 Oct 2022 16:55:03 +0800	[thread overview]
Message-ID: <87pmf549i0.fsf@localhost> (raw)
In-Reply-To: <m2ilw0pcel.fsf@ntnu.no>

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>


  parent reply	other threads:[~2022-10-06  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 17:12 [BUG] `org-fill-paragraph' doesn't respect formatting Tor Kringeland
2021-12-08 11:24 ` Marco Wahl
2022-10-06  8:55 ` Ihor Radchenko [this message]
2022-10-06 13:24 ` Rudolf Adamkovič

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmf549i0.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tor.a.s.kringeland@ntnu.no \
    /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/org-mode.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).