diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-14 16:15:09 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-14 16:15:09 +0200 |
commit | 8500501984b6b0e283722d6e96c4e359f818f7cb (patch) | |
tree | e20499850b67268fe12bee980f6a3eedeb6ae6a5 | |
parent | 182552ee75bad48b062d3b0f7e8e9dce9c1b7965 (diff) | |
download | org-mode-8500501984b6b0e283722d6e96c4e359f818f7cb.tar.gz |
org-footnote: Fix location after moving to definition
* lisp/org-footnote.el (org-footnote-goto-definition): Move to location
appropriate for further editing.
* testing/lisp/test-org-footnote.el (test-org-footnote/delete): Update
test.
-rw-r--r-- | lisp/org-footnote.el | 2 | ||||
-rw-r--r-- | testing/lisp/test-org-footnote.el | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index e23e417..cb882a4 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -387,7 +387,7 @@ value if point was successfully moved." (user-error "Definition is outside narrowed part of buffer"))) (org-mark-ring-push) (goto-char def-start) - (looking-at (format "\\[%s[]:]" label)) + (looking-at (format "\\[%s[]:] ?" label)) (goto-char (match-end 0)) (org-show-context 'link-search) (when (derived-mode-p 'org-mode) diff --git a/testing/lisp/test-org-footnote.el b/testing/lisp/test-org-footnote.el index d2e838a..9789853 100644 --- a/testing/lisp/test-org-footnote.el +++ b/testing/lisp/test-org-footnote.el @@ -172,7 +172,7 @@ ;; anonymous footnotes. (should (equal - " Definition." + "Definition." (org-test-with-temp-text "Some text\n[fn:1] Definition." (org-footnote-goto-definition "fn:1") (buffer-substring (point) (point-max))))) |