summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-01-29 23:19:58 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2013-01-29 23:19:58 +0100
commit30ef385ee03ea1f92e07f368413c065630bc01b8 (patch)
tree4b4611e97217b7a1dc2b3d5cac5f62e6b4f01b9c
parent005917702a426c20c89d77104e8756ade60157bb (diff)
downloadorg-mode-30ef385ee03ea1f92e07f368413c065630bc01b8.tar.gz
org-e-latex: Fix error in documents with empty footnote definitions
* contrib/lisp/org-e-latex.el (org-e-latex-footnote-reference): Provide a fallback definition when none is available.
-rw-r--r--contrib/lisp/org-e-latex.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 6ac8e86..7697b16 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -1371,9 +1371,11 @@ CONTENTS is nil. INFO is a plist holding contextual information."
thereis (memq (org-element-type parent)
'(footnote-reference footnote-definition table-cell)))
"\\footnotemark")
- ;; Otherwise, define it with \footnote command.
+ ;; Otherwise, define it with \footnote command. If no definition
+ ;; is available, notify it with an intrusive fallback one.
(t
- (let ((def (org-export-get-footnote-definition footnote-reference info)))
+ (let ((def (or (org-export-get-footnote-definition footnote-reference info)
+ '("FOOTNOTE DEFINITION NOT FOUND."))))
(unless (eq (org-element-type def) 'org-data)
(setq def (cons 'org-data (cons nil def))))
(concat