emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Renato Ferreira <renatofdds@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'
Date: Tue, 31 May 2022 08:53:43 -0300	[thread overview]
Message-ID: <87o7zdkjeg.fsf@gmail.com> (raw)


* org.el (org-fill-paragraph): Fill also the paragraph at
`region-beginning' when filling plain lists with active region.

TINYCHANGE
---
 lisp/org.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 6842bfe9b..8ba5f4590 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19672,7 +19672,9 @@ filling the current element."
 	      (skip-chars-backward " \t\n")
 	      (while (> (point) start)
 		(org-fill-element justify)
-		(org-backward-paragraph)))
+		(org-backward-paragraph))
+	      (goto-char start)
+	      (org-fill-element justify))
 	  (goto-char origin)
 	  (set-marker origin nil))))
      (t
-- 
2.36.1



             reply	other threads:[~2022-05-31 11:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 11:53 Renato Ferreira [this message]
2022-05-31 12:49 ` Renato Ferreira
2022-05-31 13:51   ` Sébastien Miquel

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=87o7zdkjeg.fsf@gmail.com \
    --to=renatofdds@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph'\'' in lists when `mark-active'\''' \
    /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).