emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-real e9f758a 102/160: Fully expand siblings when to


From: ELPA Syncer
Subject: [elpa] externals/org-real e9f758a 102/160: Fully expand siblings when toggling global visibility
Date: Wed, 6 Oct 2021 16:58:25 -0400 (EDT)

branch: externals/org-real
commit e9f758a652aa5ac052d901dbdba2d9e002eca06f
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>

    Fully expand siblings when toggling global visibility
---
 org-real.el | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/org-real.el b/org-real.el
index b8368a3..769cdea 100644
--- a/org-real.el
+++ b/org-real.el
@@ -699,13 +699,17 @@ non-nil, skip setting :primary slot on the last box."
             (slot-makeunbound box :expand-children))
           (if (org-real--get-all hidden-children)
               (cl-rotatef children hidden-children))
-          (mapc
-           (lambda (child)
-             (with-slots (expand-siblings) child
-               (when (slot-boundp child :expand-siblings)
-                 (funcall expand-siblings child)
-                 (slot-makeunbound child :expand-siblings))))
-           (org-real--get-all children)))
+          (let (fully-expanded)
+            (while (not fully-expanded)
+              (setq fully-expanded t)
+              (mapc
+               (lambda (child)
+                 (with-slots (expand-siblings) child
+                   (when (slot-boundp child :expand-siblings)
+                     (funcall expand-siblings child)
+                     (slot-makeunbound child :expand-siblings)
+                     (setq fully-expanded nil))))
+               (org-real--get-all children)))))
       (if (not (org-real--get-all hidden-children)) (cl-rotatef children 
hidden-children)))
     (mapc 'org-real--update-visibility (append (org-real--get-all children)
                                                (org-real--get-all 
hidden-children)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]