Merge branch 'bugfix'
This commit is contained in:
commit
f5faffb142
31
lisp/oc.el
31
lisp/oc.el
|
@ -789,6 +789,20 @@ Citations are ordered by appearance in the document, when following footnotes.
|
||||||
INFO is the export communication channel, as a property list."
|
INFO is the export communication channel, as a property list."
|
||||||
(or (plist-get info :citations)
|
(or (plist-get info :citations)
|
||||||
(letrec ((cites nil)
|
(letrec ((cites nil)
|
||||||
|
(tree (plist-get info :parse-tree))
|
||||||
|
(find-definition
|
||||||
|
;; Find definition for standard reference LABEL. At
|
||||||
|
;; this point, it is impossible to rely on
|
||||||
|
;; `org-export-get-footnote-definition' because the
|
||||||
|
;; function caches results that could contain
|
||||||
|
;; un-processed citation objects. So we use
|
||||||
|
;; a simplified version of the function above.
|
||||||
|
(lambda (label)
|
||||||
|
(org-element-map tree 'footnote-definition
|
||||||
|
(lambda (d)
|
||||||
|
(and (equal label (org-element-property :label d))
|
||||||
|
(or (org-element-contents d) "")))
|
||||||
|
info t)))
|
||||||
(search-cites
|
(search-cites
|
||||||
(lambda (data)
|
(lambda (data)
|
||||||
(org-element-map data '(citation footnote-reference)
|
(org-element-map data '(citation footnote-reference)
|
||||||
|
@ -798,22 +812,13 @@ INFO is the export communication channel, as a property list."
|
||||||
;; Do not force entering inline definitions, since
|
;; Do not force entering inline definitions, since
|
||||||
;; `org-element-map' is going to enter it anyway.
|
;; `org-element-map' is going to enter it anyway.
|
||||||
((guard (eq 'inline (org-element-property :type datum))))
|
((guard (eq 'inline (org-element-property :type datum))))
|
||||||
;; Find definition for current standard
|
;; Walk footnote definition.
|
||||||
;; footnote reference. Unlike to
|
|
||||||
;; `org-export-get-footnote-definition', do
|
|
||||||
;; not cache results as they would contain
|
|
||||||
;; un-processed citation objects.
|
|
||||||
(_
|
(_
|
||||||
(let ((label (org-element-property :label datum)))
|
(let ((label (org-element-property :label datum)))
|
||||||
(funcall
|
(funcall search-cites
|
||||||
search-cites
|
(funcall find-definition label))))))
|
||||||
(org-element-map data 'footnote-definition
|
|
||||||
(lambda (d)
|
|
||||||
(and
|
|
||||||
(equal label (org-element-property :label d))
|
|
||||||
(or (org-element-contents d) "")))))))))
|
|
||||||
info nil 'footnote-definition t))))
|
info nil 'footnote-definition t))))
|
||||||
(funcall search-cites (plist-get info :parse-tree))
|
(funcall search-cites tree)
|
||||||
(let ((result (nreverse cites)))
|
(let ((result (nreverse cites)))
|
||||||
(plist-put info :citations result)
|
(plist-put info :citations result)
|
||||||
result))))
|
result))))
|
||||||
|
|
Loading…
Reference in New Issue