Browse Source

org-footnote: ensure footnote tag is inserted after footnotes in non-Org buffers

* lisp/org-footnote.el (org-footnote-create-definition): When the tag
  is missing, it is created before any existing footnote, or at end of
  buffer.  In the latter case, the marker pointing at the position
  where the new footnote is going to be inserted (at end of buffer)
  stays before the tag.  This patch makes sure that the marker will be
  kept after the tag.
Nicolas Goaziou 6 years ago
parent
commit
774f9cb8e6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      lisp/org-footnote.el

+ 1 - 0
lisp/org-footnote.el

@@ -522,6 +522,7 @@ or new, let the user edit the definition of the footnote."
 		       (open-line 2)
 		       (point-marker))
 		   (point-max-marker))))
+	(set-marker-insertion-type max t)
 	(goto-char max)
 	;; Check if the footnote tag is defined but missing.  In this
 	;; case, insert it, before any footnote or one blank line