* [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'
@ 2022-05-31 11:53 Renato Ferreira
2022-05-31 12:49 ` Renato Ferreira
0 siblings, 1 reply; 5+ messages in thread
From: Renato Ferreira @ 2022-05-31 11:53 UTC (permalink / raw)
To: emacs-orgmode
* 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'
2022-05-31 11:53 [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active' Renato Ferreira
@ 2022-05-31 12:49 ` Renato Ferreira
2022-05-31 13:51 ` Sébastien Miquel
2022-07-19 19:36 ` Sébastien Miquel
0 siblings, 2 replies; 5+ messages in thread
From: Renato Ferreira @ 2022-05-31 12:49 UTC (permalink / raw)
To: emacs-orgmode
Considering the change 91b239829 that fixes this bug:
https://list.orgmode.org/87d04zm7gm.fsf@fastmail.fm/
I stumbled upon a bug introduced by it: filling lists with active region.
# MRE:
Go to start of list, `org-mark-element`, then `org-fill-paragraph`. The first item does not get filled.
```org
* 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.
- 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.
- 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.
```
--
Att.,
Renato Ferreira
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'
2022-05-31 12:49 ` Renato Ferreira
@ 2022-05-31 13:51 ` Sébastien Miquel
2022-07-19 19:36 ` Sébastien Miquel
1 sibling, 0 replies; 5+ messages in thread
From: Sébastien Miquel @ 2022-05-31 13:51 UTC (permalink / raw)
To: Renato Ferreira, emacs-orgmode
Hi,
Renato Ferreira writes:
> I stumbled upon a bug introduced by it: filling lists with active region.
>
> # MRE:
>
> Go to start of list, `org-mark-element`, then `org-fill-paragraph`. The first item does not get filled.
>
> ```org
> * 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.
> - 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.
> - 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.
> ```
See also
https://list.orgmode.org/041ca43d-2efb-db1e-76ab-7c15af088650@posteo.eu/
where I submitted a different patch that fixes this issue (I think) and
a couple of others.
Regards,
--
Sébastien Miquel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'
2022-05-31 12:49 ` Renato Ferreira
2022-05-31 13:51 ` Sébastien Miquel
@ 2022-07-19 19:36 ` Sébastien Miquel
2022-07-20 21:13 ` Renato Ferreira
1 sibling, 1 reply; 5+ messages in thread
From: Sébastien Miquel @ 2022-07-19 19:36 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Renato Ferreira
Hi,
Renato Ferreira writes:
> Go to start of list, `org-mark-element`, then `org-fill-paragraph`.
The first item does not get filled.
This should be fixed on main. If not, please say so.
I'm removing this from updates.orgmode.org:
Canceled.
--
Sébastien Miquel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'
2022-07-19 19:36 ` Sébastien Miquel
@ 2022-07-20 21:13 ` Renato Ferreira
0 siblings, 0 replies; 5+ messages in thread
From: Renato Ferreira @ 2022-07-20 21:13 UTC (permalink / raw)
To: Sébastien Miquel; +Cc: emacs-orgmode
On Tue, 19 Jul 2022 19:36:35 +0000, Sébastien Miquel <sebastien.miquel@posteo.eu> said:
> This should be fixed on main. If not, please say so.
It's fixed. Thank you very much.
--
Att.,
Renato Ferreira
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-20 21:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-31 11:53 [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active' Renato Ferreira
2022-05-31 12:49 ` Renato Ferreira
2022-05-31 13:51 ` Sébastien Miquel
2022-07-19 19:36 ` Sébastien Miquel
2022-07-20 21:13 ` Renato Ferreira
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.