This is brilliant!
It makes me think about recursion, and homogeneity, and how to avoid getting lost.
Itās not obvious to me that using two separate kinds of links, transcluding and normal, is optimal. It seems more natural for a link to another file to appear as a heading, just like any other heading, except with some kind of indication that itās not in the same file.
In that case the user would open it just like any other heading. They could moreover recurse, opening transcluded files within transcluded files, and the indentation would help them understand where they are.
Hereās an example. Suppose we have three files:
#+TITLE: a #+TITLE: b #+TITLE: c
* a1 * b1 * c1
** a11 ** b11 ** c11
** a12 ** <link to 'a'> ** <link to 'b'>
* a2 * b2 * c2
We can then unfold the <link to ābā> header in file ācā to reveal:
#+TITLE: c
* c1
** c11
** #+TITLE: b
* b1
** b11
** <link to 'a'>
* b2
* c2
and then recurse:
#+TITLE: c
* c1
** c11
** #+TITLE: b
* b1
** b11
** #+TITLE: a
* a1
** a11
** a12
* a2
* b2
* c2
That whitespace to the left of the transcluded files would ideally, I think, be unavailable ā i.e. the cursor canāt go there.
If a lot of headers were unfolded at this point, it could be hard to see where you are. In fact this is a problem with org mode in general ā the path to āhomeā might be well off screen. It would be cool if there was a command fcalled something like org-where-am-i
that would display the header path to where you are. For instance, from header a2
in the last image, running org-where-am-i
would display the following:
#+TITLE: c
* c1
** #+TITLE: b
* b1
** b11
** #+TITLE: a
* a2