The goal is to support showing backlinks inside an Org-mode on Emacs like it is shown on the web ui.
This could be done using additional packages like gh:org-roam/org-roam, but...
Show backlinks on org-mode
functionalitytaskThe goal is to support showing backlinks inside an Org-mode on Emacs like it is shown on the web ui.
This could be done using additional packages like gh:org-roam/org-roam, but...
I feel that it slows down emacs, especially when saving
I don't want to open a window to view the backlinks, I want them to appear on the same buffer I'm working on (hopefully without the need to physically edit the file).
As my experience with elisp is very basic, I started looking for packages that already did this...
In the end I got it working using the Org-backlink package.
Existing approaches
Org-backlink
flossgh:codecoll/org-backlink looks like a great base, it does exactly what I want, and presents exactly how I want it... but looks like it only supports ~file:~ links, and I'd rather have id:
links. No problem! The code looks really specific and readable, so it provides a great base to work on. (Note that it's GPLv3 licensed!)
This commit adds support for ID links so maybe there's no need for additional changes, maybe just grab gh:svenssonaxel/org-backlink and go with it...
With minor changes is looking good!
Minor fix on org-backlink-mode-expand-files
commit 9e90b90
Jump to org-id, instead of jump to file and search
commit 4c2e28a
I forked the org-backlink repo and applied these commits on gh:kenkeiras/org-backlink.
Try to avoid (org-open-at-point) when building cache
optimizationLooks like after using org-id-goto
this is only needed to collect the headline path (dest (org-backlink-mode-get-heading-path-string))
... 🤔 maybe this is used where the link points to, and so to on which headline to draw the backlink.
If this were true, using the ID should be enough and we could accelerate this process.
Applied on
commit 87ebbcb
Org-super-links
flossgh:toshism/org-super-links might be another approach, but it looks like it edits the file it writes the backlinks onto, and that's a no-go for me.
Org-sidebar
flossIf nothing else works out, gh:alphapapa/org-sidebar might be useful to have something working... but it's not ideal (requires a secondary buffer) and the backlinks don't look like they are a focus for the package, as the author points out:
[alphapapa] on [2020-11-03 Mar]
[...] Anyway, this feature is somewhat primitive and inflexible as-written. If you really need backlinks, a package like org-roam would probably work better for you. [...]