Переглянути джерело

org-footnote: Fix consistency between footnotes and links

* lisp/org-footnote.el (org-footnote-action): Mimic `org-open-at-point'
  behavior for consistency.
Nicolas Goaziou 9 роки тому
батько
коміт
6a0454e4f0
1 змінених файлів з 7 додано та 0 видалено
  1. 7 0
      lisp/org-footnote.el

+ 7 - 0
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