org-export: Avoid duplicates in `org-export-collect-footnote-definitions'
commitbf609d88443835c44870180c79ca9448da30f497
authorNicolas Goaziou <n.goaziou@gmail.com>
Sun, 4 Mar 2012 10:57:16 +0000 (4 11:57 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Sun, 4 Mar 2012 10:57:16 +0000 (4 11:57 +0100)
tree574f9dccc6d14bbfd7e727b800b1bdf4f4890a9d
parent6fd14fe6832184dc6976ea91a5ca01551d53fb8c
org-export: Avoid duplicates in `org-export-collect-footnote-definitions'

* contrib/lisp/org-element.el (org-element-map): New optional argument
  to avoid recursion into certain recursive types.
* contrib/lisp/org-export.el (org-export-footnote-first-reference-p,
  org-export-get-footnote-number,
  org-export-collect-footnote-definitions): Use new argument from
  `org-element-map'.
* testing/lisp/test-org-export.el: Add test.

The new argument allows to force entering footnotes definitions at
a certain time (when their first reference is found) but not a second
time when they are encountered in the parse tree.

Thanks to Jambunathan for reporting this.
contrib/lisp/org-element.el
contrib/lisp/org-export.el
testing/lisp/test-org-export.el