From 30ef385ee03ea1f92e07f368413c065630bc01b8 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 29 Jan 2013 23:19:58 +0100 Subject: [PATCH] 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. --- contrib/lisp/org-e-latex.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el index 6ac8e86bd..7697b1672 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 -- 2.11.4.GIT