Merge branch 'maint'

This commit is contained in:
Bastien Guerry 2021-04-27 08:43:35 +02:00
commit bd10c31e70
1 changed files with 13 additions and 2 deletions

View File

@ -7424,7 +7424,9 @@ Assume point is at a heading or an inlinetask beginning."
(col (+ (current-indentation) diff)))
(when (wholenump col)
(while (< (point) end-marker)
(indent-line-to col)
(if (natnump diff)
(insert (make-string diff 32))
(delete-char (abs diff)))
(forward-line)))))
(catch 'no-shift
(when (or (zerop diff) (not (eq org-adapt-indentation t)))
@ -18881,7 +18883,16 @@ ELEMENT."
(current-indentation))))
((and
(eq org-adapt-indentation 'headline-data)
(memq type '(planning clock node-property property-drawer drawer)))
(or (memq type '(planning clock node-property property-drawer drawer))
;; FIXME: when storing a note in a LOGBOOK drawer,
;; `org-store-log-note' needs to insert a new line before
;; the newly inserted note, thus the `type' at point will
;; return `paragraph' instead of the expected `drawer', so
;; we need to manually detect the drawer.
(and (looking-at-p "^$")
(save-excursion
(backward-char)
(looking-back org-drawer-regexp (point-at-bol))))))
(org--get-expected-indentation
(org-element-property :parent element) t))
((memq type '(headline inlinetask nil))