nobiot / org-transclusion

Emacs package to enable transclusion with Org Mode
https://nobiot.github.io/org-transclusion/
GNU General Public License v3.0
941 stars 48 forks source link

[Feature request] Is it possible to convert the link directly to the built-in text, breaking the link to the source file? #152

Closed LuciusChen closed 1 year ago

LuciusChen commented 2 years ago

sometimes block has beed transcluded that needs to be touched up, and I don't want to modify the source file

nobiot commented 2 years ago

Try copy and paste (yank). The yanked region should remove the association with the original and get pasted as normal text.

manueldeljesus commented 2 years ago

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?

nobiot commented 2 years ago

@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.

manueldeljesus commented 2 years ago

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.

laheadle commented 1 year ago

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.

nobiot commented 1 year ago

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:

laheadle commented 1 year ago

This is working great for me! awesome!

nobiot commented 1 year ago

@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.

nobiot commented 1 year ago

This will mean ELPA-devl will have the new feature but ELPA will wait for the new release version.

nobiot commented 1 year ago

Merged dev/detach branch. PR #163 closed. I'm closing this issue. Please re-open if something is not working.