mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-02 08:22:16 +00:00
org-footnote: Fix positioning when inserting footnotes
* lisp/org-footnote.el (org-footnote-new): Fix point when a new footnote triggers sorting. Reported-by: Gerald Wildgruber <Gerald.Wildgruber@unibas.ch> <http://permalink.gmane.org/gmane.emacs.orgmode/99997>
This commit is contained in:
parent
719a201c3b
commit
f8c4102cc6
@ -552,13 +552,13 @@ or new, let the user edit the definition of the footnote."
|
||||
(org-footnote-auto-adjust-maybe))
|
||||
(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-footnote-create-definition label)
|
||||
(org-footnote-auto-adjust-maybe)
|
||||
(if (ignore-errors (org-footnote-goto-definition label))
|
||||
(forward-char)
|
||||
;; Definition was created outside current scope: edit it
|
||||
;; remotely.
|
||||
(org-edit-footnote-reference))))))
|
||||
|
||||
(defvar org-blank-before-new-entry) ; Silence byte-compiler.
|
||||
(defun org-footnote-create-definition (label)
|
||||
|
Loading…
Reference in New Issue
Block a user