It took a while, but I am finally done with rebasing the org-fold branch code onto current main. This branch has been tested by me and other volunteers for over a year. Things are basically stable using recent Emacs versions. There were a couple of back-compatibility issues with older Emacs, which I fixed during the cleanup. Those may need to be tested more carefully after merging to main.
I would like to thank all the people who helped with bug reporting and provided bugfixes over the testing time. Thank you all - arkhan, HyunggyuJang, Robert Irelan, Alois Janíček, Anders Johansson, Daniel Kraus, Ypot, ntharim, Colin McLear, Yiming Chen, tpeacock19, and Karl Voit. After the cleanup, some patches are not included for the merge. Apart from my patches, 3 patches by Anders Johansson are included here. He has signed FSF copyright paperwork and appears on the Org mode contributor list (https://orgmode.org/worg/contributors.html). Unless there are comments on the patches below, I plan to merge the branch in the coming weeks. Please, let me know if I still need to wait for comments. Anders Johansson (3): Fix typo: delete-duplicates → delete-dups Fix bug in org-get-heading Rename remaining org-force-cycle-archived → org-cycle-force-archived Ihor Radchenko (32): Add org-fold-core: new folding engine Separate folding functions from org.el into new library: org-fold Separate cycling functions from org.el into new library: org-cycle Remove functions from org.el that are now moved elsewhere Disable native-comp in agenda org-macs: New function org-find-text-property-region org-at-heading-p: Accept optional argument org-string-width: Reimplement to work with new folding Rename old function call to use org-fold Implement link folding Implement overlay- and text-property-based versions of some functions org-fold: Handle indirect buffer visibility Fix subtle differences between overlays and invisible text properties Support extra org-fold optimisations for huge buffers Alias new org-fold functions to their old shorter names Obsolete old function names that are now in org-fold org-compat: Work around some third-party packages using outline-* functions Move `org-buffer-list' to org-macs.el Restore old visibility behaviour of org-refile Add org-fold-related tests org-manual: Update to new org-fold function names ORG-NEWS: Add list of changes Backport contributed commits Fix org-fold--hide-drawers--overlays org-string-width: Handle undefined behaviour in older Emacs org-string-width: Work around `window-pixel-width' bug in old Emacs org-fold-show-set-visibility: Fix edge case when folded region is at BOB org-fold-core: Fix fontification inside folded regions test-org/string-width: Add tests for strings with prefix properties org--string-from-props: Fix handling folds in Emacs <28 org-link-make-string: Throw error when both LINK and DESCRIPTION are empty test-ol/org-toggle-link-display: Fix compatibility with old Emacs doc/org-manual.org | 14 +- etc/ORG-NEWS | 104 ++ lisp/ob-core.el | 14 +- lisp/ob-lilypond.el | 4 +- lisp/ob-ref.el | 4 +- lisp/ol.el | 59 +- lisp/org-agenda.el | 50 +- lisp/org-archive.el | 12 +- lisp/org-capture.el | 7 +- lisp/org-clock.el | 126 +- lisp/org-colview.el | 10 +- lisp/org-compat.el | 189 ++- lisp/org-crypt.el | 8 +- lisp/org-cycle.el | 818 +++++++++++ lisp/org-element.el | 55 +- lisp/org-feed.el | 4 +- lisp/org-fold-core.el | 1503 +++++++++++++++++++ lisp/org-fold.el | 1132 +++++++++++++++ lisp/org-footnote.el | 6 +- lisp/org-goto.el | 6 +- lisp/org-id.el | 4 +- lisp/org-inlinetask.el | 26 +- lisp/org-keys.el | 26 +- lisp/org-lint.el | 3 +- lisp/org-list.el | 84 +- lisp/org-macs.el | 290 +++- lisp/org-mobile.el | 2 +- lisp/org-mouse.el | 4 +- lisp/org-refile.el | 3 +- lisp/org-src.el | 6 +- lisp/org-timer.el | 2 +- lisp/org.el | 2552 +++++++++++---------------------- lisp/ox-org.el | 2 +- lisp/ox.el | 4 +- testing/lisp/test-ob.el | 12 +- testing/lisp/test-ol.el | 24 + testing/lisp/test-org-list.el | 75 +- testing/lisp/test-org-macs.el | 6 +- testing/lisp/test-org.el | 258 +++- 39 files changed, 5475 insertions(+), 2033 deletions(-) create mode 100644 lisp/org-cycle.el create mode 100644 lisp/org-fold-core.el create mode 100644 lisp/org-fold.el -- 2.34.1
