branch: externals/org commit d01d5dd005e83903824fed552f5137a3dfed635a Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
org-fold: Avoid using 'outline overlay spec * lisp/org-fold.el (org-fold-initialize): Use org-fold-outline as invisibility spec. `reveal-mode' treats 'outline special (because of symbol property set by `outline-mode'). Because `outline-mode' folding is not compatible with org-fold, we need to use something else. * testing/lisp/test-org-list.el (test-org-list/move-item-down): (test-org-list/insert-item): Update tests to check for the new spec. Note that it should not be too breaking in practice to change this. (1) 'outline remains an alias in org-fold-core API calls (2) We had no reports about changed spec names when switching between text properties and overlays for folding, so those are not problematic in practice. Reported-by: Brett <brett.kerw...@gmail.com> Link: https://orgmode.org/list/CACZEyLj83MEyd0NvPTM9=iotsc9h4q7edtlf+w-1jfy4lvp...@mail.gmail.com --- lisp/org-fold.el | 2 +- testing/lisp/test-org-list.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-fold.el b/lisp/org-fold.el index 125585a068..9e95673777 100644 --- a/lisp/org-fold.el +++ b/lisp/org-fold.el @@ -250,7 +250,7 @@ Also, see `org-fold-catch-invisible-edits'." ;; overlays for isearch. (setq-local org-fold-core--isearch-special-specs '(org-link)) (org-fold-core-initialize - `((,(if (eq org-fold-core-style 'text-properties) 'org-fold-outline 'outline) + `((org-fold-outline (:ellipsis . ,ellipsis) (:fragile . ,#'org-fold--reveal-outline-maybe) (:isearch-open . t) diff --git a/testing/lisp/test-org-list.el b/testing/lisp/test-org-list.el index 1eb7e02c30..db45e66b87 100644 --- a/testing/lisp/test-org-list.el +++ b/testing/lisp/test-org-list.el @@ -681,7 +681,7 @@ b. Item 2<point>" (org-fold-get-folding-spec))))))) (should (equal - '(outline outline) + '(org-fold-outline org-fold-outline) (let ((org-fold-core-style 'overlays)) (org-test-with-temp-text "* Headline\n<point>- item 1\n body 1\n- item 2\n body 2" @@ -983,7 +983,7 @@ b. Item 2<point>" (org-fold-get-folding-spec nil (line-end-position 2)))))))) (should (equal - '(outline outline) + '(org-fold-outline org-fold-outline) (let ((org-fold-core-style 'overlays)) (org-test-with-temp-text "- A\n - B\n- C\n - D" (let ((org-cycle-include-plain-lists t))