How to have orgmode footnotes per entry?
Table of Contents
Problem
As laid out on reddit1, I arrange my orgmode notes as single files with lots of entries. This works great for me because emacs is more buffer-oriented than directory-oriented, so all the emacs search commands optimize for single-file approaches (eg search all headlines in my tech/blog file for the keyword of that Linux function I’ve forgotten how to use).
The single problem I have is footnotes. From the documentation you have two options: inline or in a file-wide section. My footnotes are often too long to fit inline, so I can change the name of that section but CANNOT make a section-per-entry arrangement, which is what I really want. The way I have worked around this with my blog is to always have the entry I am publishing at the top of the file, so using org-footnote-new
finds that entries footnote section first and inserts things where I want them to be. I’ve used this compromise successfully for quite some time, but it depends on the fact that you are not going to add footnotes to anything but the top entry.
Now I am converting footnotes in a non-orgmode date made by someone else, and moving the elements to the top of the file is not an option. Does anyone know of a way of implementing an entry-by-entry footnote section (say, for every * entry, or every ** entry as the case may be) without moving the single entry to the top of the buffer? The goal is for each entry to have a working footnote section of its own, which works nicely with org-footnote-action
.
Possible answer: org-footnotes-section nil
By setting org-footnote-section
to nil
the notes are simply inserted into the current headline. That means that they are successfully located in a non-centralized place, but in my particular use case, perhaps it is not centralized ENOUGH. So, with this post, I will see how these things export.
EDIT Looks like it works out just fine with the exports, so that is no issue at all. When browsing my org files directly, I guess this means that I won’t be as comfortable seeing all footnotes in a single browsable aggregation, but I’m willing to lose that comfort in order to avoid needing to do a hackish in-file shuffle2 whenever I need to post something with new footnotes.
Footnotes
1 I guess I should have considered using the orgmode mailing list, which I’ve been subscribed to for a long time. Why didn’t I? Something about Reddit seeming easier, I suppose. More findable on search engines, too? https://www.reddit.com/r/orgmode/comments/q7bpwc/how_to_have_orgmode_footnotes_per_entry/
2 With the “centralized footnote section” functionality you get when org-footnote-section
is set to a string title of the section, I would hackishly implement a fragile per-blog-post footnote section by making sure the entire blog post item, starting with *, was moved to the top of the file so that its particular “footnotes” section was the first one that C-c C-x f
(org-footnote-action
) would find in its top-bottom scan for a place to put the footnote. Now, the only dance I need is to follow the footnote link itself if I want to see if from reading the org file.