branch: externals-release/org
commit 691ebb1f5989590194ef50806fbc75f18671544c
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    lisp/ox-org.el (org-org-section): Fix footnotes in the first section
    
    * lisp/ox-org.el (org-org-section): Fix adding footnote definitions in
    first section (before the first heading).  `org-element-map' ignores
    non-nodes silently skipping processing (nil section) list.
    
    Link: https://github.com/emacsorphanage/ox-pandoc/issues/44
---
 lisp/ox-org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-org.el b/lisp/ox-org.el
index cf334dcdb2..2394a197e5 100644
--- a/lisp/ox-org.el
+++ b/lisp/ox-org.el
@@ -245,7 +245,7 @@ a communication channel."
    ;; them are included in the result.
    (let ((footnotes
          (org-element-map
-             (list (org-element-lineage section 'headline) section)
+             (list (or (org-element-lineage section 'headline) "") section)
              'footnote-reference
            (lambda (fn)
              (and (eq (org-element-property :type fn) 'standard)

Reply via email to