org-footnote: Fix consistency between footnotes and links

* lisp/org-footnote.el (org-footnote-action): Mimic `org-open-at-point'
  behavior for consistency.
This commit is contained in:
Nicolas Goaziou 2015-08-14 16:22:13 +02:00
parent 65ded0c7ed
commit 6a0454e4f0
1 changed files with 7 additions and 0 deletions

View File

@ -661,6 +661,13 @@ offer additional commands in a menu."
(let* ((context (and (not special) (org-element-context)))
(type (org-element-type context)))
(cond
;; On white space after element, insert a new footnote.
((> (point)
(save-excursion
(goto-char (org-element-property :end context))
(skip-chars-backward " \t")
(point)))
(org-footnote-new))
((eq type 'footnote-reference)
(let ((label (org-element-property :label context)))
(cond