From 7ebe87e2d5fb6c20819826e0abc4f5245a8969a2 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 15 Feb 2015 21:37:26 +0100 Subject: [PATCH] org-element: Forbid footnote references in parsed keywords * lisp/org-element.el (org-element-object-restrictions): Forbid footnote references in parsed keywords. Inserting footnote references in parsed keywords (e.g., TITLE or CAPTION) can lead to subtle bugs. Indeed, it is impossible to know in time if that particular footnote is going to be used in the output, and, therefore, if it should count, e.g., in `org-export-get-footnote-number'. --- lisp/org-element.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index cb6f36a52..9e3217921 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -358,7 +358,7 @@ Don't modify it, set `org-element-affiliated-keywords' instead.") (inlinetask ,@standard-set-no-line-break) (italic ,@standard-set) (item ,@standard-set-no-line-break) - (keyword ,@standard-set) + (keyword ,@(remq 'footnote-reference standard-set)) ;; Ignore all links excepted plain links in a link description. ;; Also ignore radio-targets and line breaks. (link bold code entity export-snippet inline-babel-call inline-src-block -- 2.11.4.GIT