0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

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'.
This commit is contained in:
Nicolas Goaziou 2015-02-15 21:37:26 +01:00
parent 176681bc65
commit 7ebe87e2d5

View file

@ -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