Is it possible to prevent editing of text within a collapsed subtree in Org Mode? That is, I would like to make it impossible to edit the hidden text. This seems like something that should exist but I haven't seen a way to do it.
From the fine Org Manual -- 2.3.3 Catching Invisible Edits:
Sometimes you may inadvertently edit an invisible part of the buffer and be confused on what has been edited and how to undo the mistake. Setting org-catch-invisible-edits to non-nil will help prevent this. See the docstring of this option on how Org should catch invisible edits and process them.
I have this in my init.el:
(setq-default org-catch-invisible-edits 'smart)
I found out about the
'smart option by hitting
C-h v org-catch-invisible-edits.