Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Rasmus <ras...@gmx.us> writes: > >> Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > >>> I think required definitions should be extracted from the included file >>> and inserted at the end of the source file, without any footnote >>> section. >> >> The "hard" solution. I will look into it. > > It may not be that hard, but it will require tests. > > You also need to check that the footnote definition doesn't appear > within included area, in which case it needs not be moved.
I have the collection of footnotes in the (beg end) area sorted out in the patch I wrote last night. Storing the triplet (document-path label footnote-text) should be enough to pin down one of them footnotes. I'm curious about the hash table. (info "(elisp) Hash Tables") says "For smaller tables (a few tens of elements) alists may still be faster [than hash tables]". For an Org document, might it not make more sense to use an alist for this? Or will the speed be regained when doing many includes from the same document (since I'd check if a footnote is already in the table)? Also, since INCLUDE is expanded before info, should I just create a new defvar holding the table during export? I guess that's the only way to hold it in memory across several INCLUDE words. > The can is open, the worms wiggling. Have fun. My favorite kind. —Rasmus -- Evidence suggests Snowden used a powerful tool called monospaced fonts