Closed LuciusChen closed 1 year ago
Try copy and paste (yank). The yanked region should remove the association with the original and get pasted as normal text.
I was looking for this functionality but the region where the transclusion is seems to be read-only. Thus, you can copy it but cannot paste anything on top, so that the links would need to be removed manually. Am I understanding something wrongly?
@manueldeljesus yes, your understanding is correct. When I am back from holidays, I will consider adding this feature. I think I would like to make sure that ‘detach’ can be undo-able.
First of all, thank you very much for your quick response. Second, what you suggest seems perfect.
My use case would be to use org-transclusion to gather my notes on a topic, and related to ones, to construct a document from there, so making transclusions detachable so that the text can be freely edited is really nice. I cannot even imagine how to make that process reversible, but it could also be really nice.
Please, do not hesitate to let me know if you need someone to test the implementation.
I would also be very interested in this feature. Personally, if I am preparing something for public viewing, I find that I very frequently need to modify my original notes which were written for my eyes only. Transclusion is great for preparing the initial version of the public document but then a second pass is required for editing and touching up the transcluded content.
Hi all. Added the feature and created PR #163. I'd appreciate it if someone could test the feature(s) in the branch.
If you have some time but unsure of how to test a branch, I will be happy to help; let me know :)
All the changes are in one file org-transclusion.el
so you can simply download it from the branch, evaluate it, and test the new features. The changes are as follows:
New command 'org-transclusion-detach' can be used on the transclusion at point. It turns it into a normal, edtitable text content.
You can undo this operation.
In addition, you can press 'C-d' directly on the transclusion at point to detach it. This is because the command is bound to 'C-d' by default in 'org-transclusion-map'.
'org-transclusion-refresh' now accepts universal argument such as 'C-u M-x org-transclusion-refresh' and detaches the transclusion at point.
'org-transclusion-add' now accepts universal argument such as 'C-u M-x org-transclusion-add' and copies the source content rather than transclude it.
You can undo this operation.
This is working great for me! awesome!
@laheadle thank you for taking the time to try the branch. I will merge it with main. I will leave it there for a few weeks to see if there is any regression before releasing a new version.
This will mean ELPA-devl will have the new feature but ELPA will wait for the new release version.
Merged dev/detach branch. PR #163 closed. I'm closing this issue. Please re-open if something is not working.
sometimes block has beed transcluded that needs to be touched up, and I don't want to modify the source file