nobiot / org-transclusion

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

[Q/FR] Is there a way to auto-refresh all transclusions in the current buffer? #205

Closed NightMachinery closed 7 months ago

NightMachinery commented 7 months ago

Is there a way to auto-refresh all transclusions in the current buffer?

I currently have to use org-transclusion-remove-all then org-transclusion-add-all to refresh all the transclusions. Live sync offers editing, which I don't want (assuming it's buggier than read-only live sync). org-transclusion-refresh only refreshes the transclusion at point.

nobiot commented 7 months ago

Refresh is just a convenient way to do remove then add (mainly to enable “g” key for refresh when your cursor is in a transition. So what you do is in line with it. I think you can consider a custom function and have a keybinding if you prefer.

NightMachinery commented 7 months ago
(defun night/org-transclusion-refresh-all ()
      (interactive)
      (org-transclusion-remove-all)
      (org-transclusion-add-all))