* lisp/org-fold.el (org-fold-catch-invisible-edits-commands): New
custom option.
(org-fold-catch-invisible-edits): Mention the new custom option in the
docstring.
(org-fold-check-before-invisible-edit-maybe): New function checking
if edits are safe for `this-command'.
(org-fold--advice-edit-commands): New function advising the functions
with `org-fold-check-before-invisible-edit-maybe'.
* lisp/org.el (org-mode): Advice functions on Org startup.
(org-self-insert-command):
(org-delete-backward-char):
(org-delete-char):
(org-meta-return): Do not call `org-fold-check-before-invisible-edit'
and rely on the new advise mechanism instead.
* etc/ORG-NEWS (Commands affected by ~org-fold-catch-invisible-edits~
can now be customized): Announce the change.
* doc/org-manual.org (Catching invisible edits): Mention new
customization.
@ -51,6 +51,18 @@ encounter issues, and users are advised to update to the most recent
version of org-caldav. See [[https://github.com/dengste/org-caldav/commit/618bf4cdc9be140ca1993901d017b7f18297f1b8][this org-caldav commit]] for more information.
** New and changed options
*** Commands affected by ~org-fold-catch-invisible-edits~ can now be customized
New user option ~org-fold-catch-invisible-edits-commands~ controls
which commands trigger checking for invisible edits.
The full list of affected commands is:
- ~org-self-insert-command~
- ~org-delete-backward-char~
- ~org-delete-char~
- ~org-meta-return~
- ~org-return~ (not checked in earlier Org versions)
*** New customization ~org-image-max-width~ limiting the displayed inline image width
New custom variable ~org-image-max-width~ limits the maximum inline