mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-31 20:48:37 +00:00
Do not fill paragraph before region
* lisp/org.el (org-fill-paragraph): Do not fill paragraph before region. * testing/lisp/test-org.el (test-org/fill-paragraph): Add test. Reported-by: Matt Lundin <mdl@imapmail.org> <http://lists.gnu.org/r/emacs-orgmode/2020-07/msg00164.html>
This commit is contained in:
parent
fe41103d50
commit
91b2398293
@ -19375,8 +19375,7 @@ filling the current element."
|
||||
(skip-chars-backward " \t\n")
|
||||
(while (> (point) start)
|
||||
(org-fill-element justify)
|
||||
(org-backward-paragraph))
|
||||
(org-fill-element justify))
|
||||
(org-backward-paragraph)))
|
||||
(goto-char origin)
|
||||
(set-marker origin nil))))
|
||||
(t
|
||||
|
@ -752,6 +752,15 @@
|
||||
(push-mark (point) t t)
|
||||
(goto-char (point-min))
|
||||
(call-interactively #'org-fill-paragraph)
|
||||
(buffer-string)))))
|
||||
(should
|
||||
(equal "012345678 9\n\n012345678\n9"
|
||||
(org-test-with-temp-text "012345678 9\n<point>\n012345678 9"
|
||||
(let ((fill-column 10))
|
||||
(transient-mark-mode 1)
|
||||
(push-mark (point) t t)
|
||||
(goto-char (point-max))
|
||||
(call-interactively #'org-fill-paragraph)
|
||||
(buffer-string))))))
|
||||
|
||||
(ert-deftest test-org/auto-fill-function ()
|
||||
|
Loading…
Reference in New Issue
Block a user