From cf7111a87645262c68214a03ca88f72bb0710049 Mon Sep 17 00:00:00 2001 From: TRS-80 Date: Sat, 9 Jan 2021 11:50:50 -0500 Subject: [PATCH] org-footnote: fix inserting new footnote mangling drawers * org-footnote.el (org-footnote-create-definition): Replace `forward-line' with `org-end-of-meta-data' to skip over any properties and/or drawers that may be present on the `org-footnote-section' heading (default "Footnotes"). TINYCHANGE --- lisp/org-footnote.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 3d42421e0..47ad4aa04 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -704,7 +704,7 @@ function doesn't move point." (concat "^\\*+[ \t]+" (regexp-quote org-footnote-section) "[ \t]*$") nil t)) (goto-char (match-end 0)) - (forward-line) + (org-end-of-meta-data t) (unless (bolp) (insert "\n"))) (t (org-footnote--clear-footnote-section))) (when (zerop (org-back-over-empty-lines)) (insert "\n")) -- 2.29.2