lisp/org.el (org-sort-entries): Fix when end of region is not a bol
* lisp/org.el (org-sort-entries): Avoid putting a heading not at bol when end of selected region is not at bol. Reported-by: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> Link: https://orgmode.org/list/8d637a8a-6cbc-4158-bded-f9182716a1fc@posteo.de
This commit is contained in:
parent
bf1d45f9ba
commit
67ce9386ad
|
@ -7778,6 +7778,12 @@ function is being called interactively."
|
|||
|
||||
(save-restriction
|
||||
(narrow-to-region start end)
|
||||
;; No trailing newline - add one to avoid
|
||||
;; * heading
|
||||
;; text* another heading
|
||||
(save-excursion
|
||||
(goto-char end)
|
||||
(unless (bolp) (insert "\n")))
|
||||
(let ((restore-clock?
|
||||
;; The clock marker is lost when using `sort-subr'; mark
|
||||
;; the clock with temporary `:org-clock-marker-backup'
|
||||
|
|
Loading…
Reference in New Issue