Daniel Fleischer <danfl...@gmail.com> writes: > Ihor Radchenko <yanta...@gmail.com> writes: > >> Fixed on main by d2a459d25 > > I've tried the commit. I think there are still issues. E.g. given a > folded headline > > * Introduction...| > * Section > > Inserting text at that point will do the following thing depending on > `org-fold-catch-invisible-edits': > > - error : it inserts the text without unfolding; most dangerous. > - show : unfold, insert the text without displaying it; dangerous. > - show-and-error: unfold but inserts the text anyways.
Thanks for testing! The problem here is that emphasis markers and links are also partially hidden and it is a good idea to check invisible edits there. It's just that they were ignored by org-catch-invisible-edits in the past. But not anymore. I afraid that it is impossible to follow the present docstring for org-catch-invisible-edits without mixing 'error/'show-and-error with 'smart. It's perfectly fine to insert text right after trailing ]] of the links, but, as you showed, not after folded headline contents. Now, we have different kinds of hidden text at hand: - folded headlines/lists - folded drawers - folded blocks - folded links/emphasis The question is what should be the logical behaviour of Org when editing text inside or at the border of these hidden text types? How should we interpret the values of org-catch-invisible-edits (nil error show show-and-error smart)? Best, Ihor