Hi, I fixed the nitpicks, but no major changes. Nicolas Goaziou writes: > Pleonasm. > > Note that the regexp can match even if not at a footnote reference [...]: Fair enough. > In a thousand years, scholars might debate over the secret meaning > behind these symbols. Let's hope so! In the meantime i will let the user shoot herself in the foot at specify wrong labels. >>> This marker is not necessary since you're not going to add contents >>> before (point-min) anyway. A plain number is enough. >> >> I might if I include *Bar here: >> >> * Foo >> [1] foo >> >> * Bar >> Baz[1] > > I'm not sure to understand. Would you mind elaborating? If I have #+INCLUDE: "example-above.org::*Bar" then point-min of the include area will be pushed forward by four since the definition of [1] is changed to fn:1-1 or something like that. So min-marker should be a marker. Or I'm misunderstanding something. > The more I look at it, the more I'm seduced by > > (unless included > (org-with-wide-buffer > (goto-char (point-max)) > (maphash (lambda (ref def) (insert (format "\n[%s] %s\n" ref def))) > footnotes))))))))))) > > I'm really nitpicking, tho. Since it's soon Christmas, so I could perhaps accommodate. >> ;; Append ID to all footnote references and definitions, so they >> ;; become file specific and cannot collide with footnotes in other >> ;; included files. >> + ;; Further, collect relevant footnotes outside of LINES. > > You can include it in the previous paragraph, or insert a blank comment > line, as it wouldn't survive a M-q. Let's M-q it then. >> + (goto-char (1+ (org-element-property :begin reference))) >> + (when label > > Shouldn't these two lines be inverted? Sure that's prettier. Cheers, Rasmus -- ツ