diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-06-28 00:28:47 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-06-28 00:28:47 +0200 |
commit | 07de65e1ea3eda43e6fa8bec84309e9464a09ab6 (patch) | |
tree | d02ae53a7a6ef3b7c2c24bb9d5309c9be1cf5adf | |
parent | f196fb3bed2cf9156d485315d46d193cc877b6aa (diff) | |
download | org-mode-07de65e1ea3eda43e6fa8bec84309e9464a09ab6.tar.gz |
ox: Small fix
* lisp/ox.el (org-export--missing-definitions): Fix typo and remove
useless comment
* testing/lisp/test-ox.el (test-org-export/footnotes): Add test.
-rw-r--r-- | lisp/ox.el | 16 | ||||
-rw-r--r-- | testing/lisp/test-ox.el | 9 |
2 files changed, 16 insertions, 9 deletions
@@ -2669,14 +2669,12 @@ from tree." (cond ((eq (org-element-type f) 'footnote-definition) f) ((eq (org-element-property :type f) 'standard) nil) - (t - ;; Since we're only interested in footnote definitions - (let ((label (org-element-property :label f))) - (when label ;Skip anonymous references. - (apply - #'org-element-create - 'footnote-definition `(:label ,label :post-blank 1) - (org-element-contents f)))))))))) + (t (let ((label (org-element-property :label f))) + (when label ;Skip anonymous references. + (apply + #'org-element-create + 'footnote-definition `(:label ,label :post-blank 1) + (org-element-contents f)))))))))) ;; If a select tag is active, also ignore the section before the ;; first headline, if any. (when selected @@ -2768,7 +2766,7 @@ a list of footnote definitions or in the widened buffer." (if (eq (org-element-type d) 'footnote-definition) d (let ((label (org-element-property :label d))) (apply #'org-element-create - 'footnote-definition `(:label d :post-blank 1) + 'footnote-definition `(:label ,label :post-blank 1) (org-element-contents d))))) missing-definitions)))) diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index 8177ea4..3744318 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -2059,6 +2059,15 @@ Para2" <point>Paragraph[fn:1]" (narrow-to-region (point) (point-max)) (org-export-as (org-test-default-backend))))) + (should + (string-match + "D2" + (org-test-with-temp-text " +\[fn:1] Out of scope[fn:2:D2] +* Title +<point>Paragraph[fn:1]" + (narrow-to-region (point) (point-max)) + (org-export-as (org-test-default-backend))))) ;; Export footnotes in pruned parts of tree. (should (string-match |