0

When exporting an org-mode file to html, when UUID contain the string "fb", error org-export--missing-definitions: Definition not found for footnote 1 would be reported, aborting the export, if there is no footnote subtree.

and the label would change, "fb" would be footnote 1, "fe" would be footnote 2. also "3ae7902e-13a9-439b-8a9b-dd76cea10196" cause footnote 2 missing, so it may be an org-id thing?

To illustrate, this file is problematic, and will give the above error.

:PROPERTIES:
:ID: 7e8052c5-8cfb-4131-b456-220719060b5a
:END:
#+title: atomic
#+filetags: :draft:
property of being self-contained; not dependent on others/upstream.
* [[id:673610ee-8ba5-4918-80a4-80f800df9dfe][zettelkasten]]
notes being atomic means that the note would manage to address an idea with as little reference as possible, and as much literal and plain words as possible

but nor will this one (org-footnote-new)

:PROPERTIES:
:ID: 7e8052c5-8cfb-4131-b456-220719060b5a
:END:
#+title: atomic
#+filetags: :draft:

property of being self-contained; not dependent on others/upstream.[fn:1]
* [[id:673610ee-8ba5-4918-80a4-80f800df9dfe][zettelkasten]]
notes being atomic means that the note would manage to address an idea with as little reference as possible, and as much literal and plain words as possible

* Footnotes

[fn:1]

or this one (deleteing "b" in the "8cfb" section in ID)

:PROPERTIES:
:ID: 7e8052c5-8cf-4131-b456-220719060b5a
:END:
#+title: atomic
#+filetags: :draft:
property of being self-contained; not dependent on others/upstream.
* [[id:673610ee-8ba5-4918-80a4-80f800df9dfe][zettelkasten]]
notes being atomic means that the note would manage to address an idea with as little reference as possible, and as much literal and plain words as possible

A temporary fix is attaching footnote in every such file or with a hook, but does anyone know how this would happen and/or how to fix this?

edit: My org-mode version

Org mode version 9.7 (9.7-??-57b94f3 @ /home/linfeng/emacs-distros/doomemacs/.local/straight/build-29.1/org/)

as NickD pointed out, emacs -Q with the file then org-export do not have the footnote issue

1
  • I cannot reproduce it: I created a referent for the zettelkasten link (I had to add its ID to the ID database with org-id-add-location), but after that exporting the file succeeded with no problem. What version of Org mode are you running? M-x org-version will tell you. Please add that info to the question.
    – NickD
    Feb 3 at 18:36

2 Answers 2

0

Sounds like a bug to me. Can you use M-x report-emacs-bug to send all of that information to the developers mailing list?

1
  • I think the OP should first make sure that it is a bug, rather than a config problem. Starting it with emacs -Q and a minimal init file (if necessary) is probably the first step.
    – NickD
    Feb 4 at 5:25
0

After probing around my configuration, I was able to locate the problem: I have a publish.el script which includes

(add-hook 'org-export-before-processing-functions 'collect-backlinks-string)

In collect-backlinks-string, paragraphs in other files with link to this org-id would be copied and pasted in a subtree, and some of them have footnotes in it, causing arbitary footnote n missing error.

Changing org-id make the issue disappears as it'd prevent any text to be copied in collect-backlinks-string.

I fixed the problem by adding this line

(let* (...
       (text ... ;; getting text
       (text (s-replace-regexp "\\[fn:[0-9]+\\]" "" text)) ;; this line
       ...)
)

after where text of reference is retrieved.

Many thanks to NickD's comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.