diff --git a/lisp/org.el b/lisp/org.el index 2b83aadea..5d6ad6dd9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -23009,11 +23009,7 @@ ELEMENT." (let ((cend (org-element-property :contents-end element))) (and cend (<= cend pos)))) (if (memq type '(footnote-definition item plain-list)) - (let ((last (org-element-at-point))) - (org--get-expected-indentation - last - (memq (org-element-type last) - '(footnote-definition item plain-list)))) + (org--get-expected-indentation (org-element-at-point) nil) (goto-char start) (org-get-indentation))) ;; In any other case, indent like the current line. diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index ffdd1b359..d64da2a04 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -656,6 +656,11 @@ (goto-char (point-max)) (let ((org-adapt-indentation t)) (org-indent-line)) (org-get-indentation)))) + (should + (= 2 + (org-test-with-temp-text "- A\n B\n\n" + (let ((org-adapt-indentation nil)) (org-indent-line)) + (org-get-indentation)))) ;; Likewise, on a blank line at the end of a footnote definition, ;; indent at column 0 if line belongs to the definition. Otherwise, ;; indent like the definition itself.