Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'

2022-07-20 Thread Renato Ferreira
On Tue, 19 Jul 2022 19:36:35 +, Sébastien Miquel 
 said:

> This should be fixed on main. If not, please say so.

It's fixed. Thank you very much.

-- 
Att.,
Renato Ferreira



Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'

2022-07-19 Thread Sébastien Miquel



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



Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'

2022-05-31 Thread Sébastien Miquel

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-7c15af088...@posteo.eu/
where I submitted a different patch that fixes this issue (I think) and
a couple of others.

Regards,

--
Sébastien Miquel




Re: [PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'

2022-05-31 Thread Renato Ferreira
Considering the change 91b239829 that fixes this bug:
https://list.orgmode.org/87d04zm7gm@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



[PATCH] lisp/org.el: Fix `org-fill-paragraph' in lists when `mark-active'

2022-05-31 Thread Renato Ferreira


* 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