From 6a0454e4f053353a18687186e0fd93b9a6d78748 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 14 Aug 2015 16:22:13 +0200 Subject: [PATCH] org-footnote: Fix consistency between footnotes and links * lisp/org-footnote.el (org-footnote-action): Mimic `org-open-at-point' behavior for consistency. --- lisp/org-footnote.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index fd48182f6..c3af9653e 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -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