emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: emacs-orgmode@gnu.org
Subject: [BUG] org-fill-paragraph fills paragraph before selected region
Date: Mon, 13 Jul 2020 16:27:21 -0500	[thread overview]
Message-ID: <87d04zm7gm.fsf@fastmail.fm> (raw)

When there is an active region, the function org-fill-paragraph does not
limit itself to the active region but also fills the paragraph before
the active region.

Steps to reproduce. Use the following file. Mark the last two entry
paragraphs, beginning at "Lorem" and ending at the end of the buffer
("erat."). Type 'M-q' (org-fill-paragraph).

--8<---------------cut here---------------start------------->8---
* This is a test

  Aliquam erat volutpat.  Nunc eleifend leo vitae magna.  In id erat non orci commodo lobortis.  Proin neque massa, cursus ut, gravida ut, lobortis eget, lacus.  Sed diam.  Praesent fermentum tempor tellus.  Nullam tempus.  Mauris ac felis vel velit tristique imperdiet.  Donec at pede.  Etiam vel neque nec dui dignissim bibendum.  Vivamus id enim.  Phasellus neque orci, porta a, aliquet quis, semper a, massa.  Phasellus purus.  Pellentesque tristique imperdiet tortor.  Nam euismod tellus id erat.

  Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  Donec hendrerit tempor tellus.  Donec pretium posuere tellus.  Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus.  Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.  Nulla posuere.  Donec vitae dolor.  Nullam tristique diam non turpis.  Cras placerat accumsan nulla.  Nullam rutrum.  Nam vestibulum accumsan nisl.

  Aliquam erat volutpat.  Nunc eleifend leo vitae magna.  In id erat non orci commodo lobortis.  Proin neque massa, cursus ut, gravida ut, lobortis eget, lacus.  Sed diam.  Praesent fermentum tempor tellus.  Nullam tempus.  Mauris ac felis vel velit tristique imperdiet.  Donec at pede.  Etiam vel neque nec dui dignissim bibendum.  Vivamus id enim.  Phasellus neque orci, porta a, aliquet quis, semper a, massa.  Phasellus purus.  Pellentesque tristique imperdiet tortor.  Nam euismod tellus id erat.
--8<---------------cut here---------------end--------------->8---

This is the result. Note that the first paragraph, which is outside the
selected region, is also filled.

--8<---------------cut here---------------start------------->8---
* This is a test

  Aliquam erat volutpat. Nunc eleifend leo vitae magna. In id erat non
  orci commodo lobortis. Proin neque massa, cursus ut, gravida ut,
  lobortis eget, lacus. Sed diam. Praesent fermentum tempor tellus.
  Nullam tempus. Mauris ac felis vel velit tristique imperdiet. Donec
  at pede. Etiam vel neque nec dui dignissim bibendum. Vivamus id
  enim. Phasellus neque orci, porta a, aliquet quis, semper a, massa.
  Phasellus purus. Pellentesque tristique imperdiet tortor. Nam
  euismod tellus id erat.

  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
  hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
  nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
  natoque penatibus et magnis dis parturient montes, nascetur
  ridiculus mus. Nulla posuere. Donec vitae dolor. Nullam tristique
  diam non turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam
  vestibulum accumsan nisl.

  Aliquam erat volutpat. Nunc eleifend leo vitae magna. In id erat non
  orci commodo lobortis. Proin neque massa, cursus ut, gravida ut,
  lobortis eget, lacus. Sed diam. Praesent fermentum tempor tellus.
  Nullam tempus. Mauris ac felis vel velit tristique imperdiet. Donec
  at pede. Etiam vel neque nec dui dignissim bibendum. Vivamus id
  enim. Phasellus neque orci, porta a, aliquet quis, semper a, massa.
  Phasellus purus. Pellentesque tristique imperdiet tortor. Nam
  euismod tellus id erat.
--8<---------------cut here---------------end--------------->8---

Best,

Matt


             reply	other threads:[~2020-07-13 21:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 21:27 Matt Lundin [this message]
2020-07-14  9:47 ` Nicolas Goaziou

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=87d04zm7gm.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [BUG] org-fill-paragraph fills paragraph before selected region' \
    /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

Code repositories for project(s) associated with this 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).