I wonder what people in org-roam community conveniently use to get transclusion job done as fast as possible.
Say I have a source.org buffer with 50 lines of text and target.org buffer ready to receive the transclusion. My current workflow is while I am in the source buffer I hit C-u C-c l org-store-link to get a link to the source buffer NAME then I move to the target buffer and hit tx TAB this will invoke a yasnippet completion to:
#+transclude : [pointer-will-be-positioned-here-waiting] :lines
then at where pointer sits I hit C-c C-l (org-insert-link), then I specify the lines to be transcluded like :lines 22-22 (yes this is how to transclude one line).
First off, is there an easier way to do it?
Second, I don’t like it when org-store-link fetches org buffer name, it would be much better if it could fetch org-id of the current node, because in org-roam it is much better to do connections using the node IDs. So how to get org-store-link get the ID of the node rather than the name of it?
Third, may be in org-roam there is an easy way, I am still unaware of, to always fetch the id of the current buffer, which would be then usefully exploited to do the desired transclude. There is a function org-roam-node-at-point to get elisp structure of the node, but this requires some elisp skill to make use of it, unfortunately it’s not my venue.
It would be nice to see a function that fetches the id from the output of the function above and concatenate it with [[id:<number>]].
Hi @nobiot Thanks a lot for these valuable info. I am now trying to experiment with your suggestions to get the most efficient way to do it. By the way I discovered a gem function org-id-get-create in org-mode (always fascinating):
It is bound to C-c i d.
(org-id-get-create &optional FORCE)
Create an ID for the current entry and return it.
If the entry already has an ID, just return it.
With optional argument FORCE, force the creation of a new ID.
But unfortunately, what is getting in the way, is a minor thing, the IDs of org-roam nodes are just NOT UNDER AN ENTRY (heading entry), there must be an entry so that C-c i d can do its job. Just to share my little disappointment.
when I do org-insert-link I am constantly getting prompted to enter values? What variant of links you pick? roam: , id:, file:, those I have tried to no avail. Neither I got org-id copied to the kill-ring (clipboard) by org-id-store-link.
This works great. However, in my humble opinion, when I do org-transclusion-make-from-link I didn’t like the effect of IMMEDIATELY doing the transclusion into the buffer when the org-transclusion-mode is on (which is almost the case) because my buffer get cluttered so fast causing a bit of inconvenience. I would like to have the default to just show the transclusion keyword and the link, that’s it, because at this point, I would rather pick some lines to be transcluded and not everything. This is true when you are doing transclusion to a reference node buffer, where I have many notes (org-noter entries) for a PDF. So the desired behavior for org-transclusion-make-from-link to just put the keyword and stop right there, to allow the user at this point to decide whether to go with everything or pick some lines and add some other options (mostly the case). As such, I am left with one inconvenient option: to disable org-transclusion-mode before doing org-transclusion-make-from-link to get the desired effect.