From d52d6b331e92dddce5477c131858ded7e091599e Mon Sep 17 00:00:00 2001 From: Matt Lundin Date: Thu, 13 Aug 2015 13:14:34 -0500 Subject: [PATCH] Fix position of cursor when creating footnotes * lisp/org-footnote.el (org-footnote-auto-label): Call org-footnote-auto-adjust-maybe after going to the footnote definition. Otherwise the correct position is lost. --- lisp/org-footnote.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 7396609..1048219 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -553,12 +553,12 @@ or new, let the user edit the definition of the footnote." (t (insert "[" label "]") (let ((l (copy-marker (org-footnote-create-definition label)))) - (org-footnote-auto-adjust-maybe) (or (ignore-errors (org-footnote-goto-definition label l)) ;; Since definition was created outside current ;; scope, edit it remotely. (progn (set-marker l nil) - (org-edit-footnote-reference)))))))) + (org-edit-footnote-reference)))) + (org-footnote-auto-adjust-maybe))))) (defvar org-blank-before-new-entry) ; Silence byte-compiler. (defun org-footnote-create-definition (label) -- 2.5.0