0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 19:07:52 +00:00

org.el (org-fixup-indentation): Fix logbook drawers indentation

* lisp/org.el (org-fixup-indentation): Fix logbook drawers
indentation.

Reported-by: Matt Lundin <mdl@imapmail.org>
https://orgmode.org/list/87r1t8sdhd.fsf@fastmail.fm/
This commit is contained in:
Bastien 2020-09-07 09:17:21 +02:00
parent 81d49b5adb
commit 11ef7454ab

View file

@ -7381,9 +7381,11 @@ Assume point is at a heading or an inlinetask beginning."
(forward-line)
(org-indent-region (match-beginning 0) (match-end 0)))
(when (looking-at org-logbook-drawer-re)
(goto-char (match-end 0))
(forward-line)
(org-indent-region (match-beginning 0) (match-end 0)))
(let ((end-marker (move-marker (make-marker) (match-end 0)))
(ci (current-indentation)))
(while (and (not (> (point) end-marker)) (>= ci diff))
(indent-line-to (+ ci diff))
(forward-line))))
(catch 'no-shift
(when (or (zerop diff) (not (eq org-adapt-indentation t)))
(throw 'no-shift nil))