* lisp/org-fold.el (org-fold--reveal-outline-maybe): Widen the buffer
before testing headline validity. Otherwise, `goto-char' may not move
where expected in narrowed buffer.
* lisp/org-fold-core.el (org-fold-core-folded-p): Allow list of fold
types to be passed as argument.
* lisp/org-fold.el (org-fold-check-before-invisible-edit--overlays):
(org-fold-check-before-invisible-edit--text-properties): Make
overlay/text-property behaviour consistent. Do not handle edits
inside folded links. Fix inconsistencies.
* testing/lisp/test-org-fold.el:
* testing/lisp/test-org.el: Move folding-related tests to new test
file.
* testing/lisp/test-org-fold.el:
(test-org-fold/org-catch-invisible-edits): New test.
See https://orgmode.org/list/m2o809q170.fsf@gmail.com
*
lisp/org-fold.el (org-fold-check-before-invisible-edit--text-properties):
Consider `border-and-ok-direction' value when deciding whether to
throw an error and reveal the fold. Never throw an error when editing
at border without affecting the text inside.
Fixes https://orgmode.org/list/m2ilqle995.fsf@gmail.com
*
lisp/org-fold.el (org-fold-save-outline-visibility--text-properties):
Do not expand list of specs on compile time. Simplify saving and
re-applying folds.
* lisp/org-fold.el (org-fold-save-outline-visibility): Fix typo when
-> if.
* lisp/org-fold.el (org-fold--isearch-reveal): Call
`org-fold-show-visibility'. The previously used
`org-fold-show-set-visibility' does not accept context as argument.
Reported in https://orgmode.org/list/8735i5gd8n.fsf@gmail.com