org-transclusion
org-transclusion copied to clipboard
transclusion of link within same file
When I try to transclude a heading in some other place in the same file, it doesn't work. It even seems to delete both the link and the #+transclusion: t
line.
I guess that's just not supported at the moment, right? Are you planning to include this in the future?
It might seem like an obscure thing to do, but I would actually use it quite often. For example, I like doing what is sometimes called literate devops, where it's quite handy to transclude certain blocks which I need over and over again, such as small blocks to login to some remote server, without having to duplicate this information.
Let me see what I can do....
I had a look.
Internally linking to an element within the same file seems to work as is.
But with the "file" link like this [[file:path/to/itself.org::*headline][Heading]]
.
The source overlay's region is incorrectly identified with the current v0.0.5, but will be fixed in the next one.
It will look like this:
Internal linking with a more "normal" syntax via fuzzy link like [[*Headline]]
needs a whole new set of functions.
I will consider this in the future release (I will need to slow down a bit after the next update; I will need to focus on my private stuff until April 2021).
I had a look.
Thanks!
Internally linking to an element within the same file seems to work as is. But with the "file" link like this
[[file:path/to/itself.org::*headline][Heading]]
.
Ah, I didn't know this. I usually insert links by relying on org-store-link
so I had not realized that's the problem.
Internal linking with a more "normal" syntax via fuzzy link like
[[*Headline]]
needs a whole new set of functions. I will consider this in the future release (I will need to slow down a bit after the next update; I will need to focus on my private stuff until April 2021).
Okay, sure. I think since it's working using the 'file' links, it need not be a very high priority. More like a nice-to-have for things like org-store-link
.
Thank you, @wuqui!