emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Edrie Ddrie <planete3@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Should we make org-fill-element respect the selected region and not expand the selection to the element boundaties? (was: Bug: org-fill-paragraph [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)])
Date: Thu, 06 Oct 2022 16:38:36 +0800	[thread overview]
Message-ID: <87sfk14a9f.fsf@localhost> (raw)
In-Reply-To: <87bl2g9ptk.fsf@localhost>

Ihor Radchenko <yantar92@gmail.com> writes:

> Edrie Ddrie <planete3@gmail.com> writes:
>
>> When using `org-fill-paragraph' on a part of a paragraph, e.g. with halve
>> the lines as active region, it still uses the unselected text around when
>> filling.
>> This works different than `fill-paragraph', `fill-region' and
>> `fill-region-as-paragraph' that fill only the selected part of a paragraph
>> WITHOUT effecting the text around.
>> I don't know if this is a real bug but it is confusing, and annoying
>> because org-mode overrides the default `C-q' key binding for
>> `fill-paragraph' so I have to invoke that command via M-x.
>
> Confirmed

While I understand that the current behaviour is unexpected, it is
internally consistent within Org for different kind of Org elements:
paragraphs, source blocks, comments, tables etc. For all the elements,
Org effectively expands the region boundaries to the beginning/end of
the first/last element in the selected region.

If we do decide to change expanding the selection to the element
boundaries, it should be done across all filled element types.

It will also be a breaking change.

Should we go for it?

-- 
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	other threads:[~2022-10-06  9:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 18:29 Bug: org-fill-paragraph [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Edrie Ddrie
2021-11-19 14:34 ` Ihor Radchenko
2022-10-06  8:38   ` Ihor Radchenko [this message]
2022-10-06  9:32     ` Should we make org-fill-element respect the selected region and not expand the selection to the element boundaties? Fraga, Eric

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=87sfk14a9f.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=planete3@gmail.com \
    /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).