sajmunko · 2022-05-18 08:53
Hi
I am new to emacs.
I have a simple need in mind and would like to ask if there exists a mode for my requirements.
​
I have a large library of txt files in the range of 1-2 millions (archival stuff).
What I basically look for is some mode that can do something along the lines of:
\- Internal links that can reference particular paragraphs in other files (in Obsidian called ['link to blocks](https://help.obsidian.md/How+to/Link+to+blocks)')
\- Transclusion
... and do so with the large number of files; that is to say, not a *personal* knowledge base, but a solid archival library.
I have in mind pretty much what [Obsidian internal links](https://help.obsidian.md/How+to/Internal+link) can do.
I know there is [howm](https://howm.osdn.jp), [freex](https://github.com/gregdetre/emacs-freex), and org-roam (though I've heard the latter can only handle well *personal* knowledge base, not a larger archive library).
ideasman_42 · 2022-05-18 10:57
This kind of thing is in fact not _that_ hard to write yourself, you can write an xref back-end for example, see: [xref-rst](https://codeberg.org/ideasman42/emacs-xref-rst) - even though this implements linking for reStructuredText you could use it as a reference for linking between files using your own syntax.
It's up to you how you handle searches, if you cache link information or use an external tool.
Alan_Shutko · 2022-05-18 12:40
This sounds a lot like the original use case for [Hyperbole](https://www.gnu.org/software/hyperbole/), if my distant memory is working.
tgv88in · 2022-05-18 17:26
org- transclusion
00-11 · 2022-05-18 17:28
A very simple one, **LinkD**: https://www.emacswiki.org/emacs/download/linkd.el
Phil-Hudson · 2022-05-19 10:19
Surprised nobody has said this: vanilla Org Mode does everything you want.
Hyperbole was mentioned, and it's (IMO) a slightly better solution for your first requirement, but offers nothing (AFAICT) for your second, which Org does offer.
ahyatt · 2022-05-20 03:21
AFAICT, org-mode can't do this. You can't link to arbitrary unmarked paragraphs in org. It also can't do transclusion.
Phil-Hudson · 2022-05-20 06:40
You're quite right about the first point (links to arbitrary text). My bad. Not the second though. You can use `#+INCLUDE` directives for Org files (see `(info "(org) Include Files")`). You can call code blocks from other files too: `(info "(org) Evaluating Code Blocks")`.