소스 검색

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 13 년 전
부모
커밋
774f9cb8e6
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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