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

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

[elpa] externals/org e9781f1c08: org-fold-core: Respect 'ignore-indirect


From: ELPA Syncer
Subject: [elpa] externals/org e9781f1c08: org-fold-core: Respect 'ignore-indirect optimization better
Date: Thu, 29 Sep 2022 10:57:55 -0400 (EDT)

branch: externals/org
commit e9781f1c0864eaa6ef26c25295a8881b58102b1d
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-fold-core: Respect 'ignore-indirect optimization better
    
    * lisp/org-fold-core.el (org-fold-core--property-symbol-get-create):
    (org-fold-core-decouple-indirect-buffer-folds): Do not try to decouple
    folding state in indirect buffers when 'ignore-indirect is requested
    in `org-fold-core--optimise-for-huge-buffers'.
---
 lisp/org-fold-core.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index cedde742aa..628a73bbc3 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -552,7 +552,8 @@ unless RETURN-ONLY is non-nil."
                                      org-fold-core--property-symbol-cache))))
         (prog1
             local-prop
-          (unless return-only
+          (unless (or return-only
+                      (memql 'ignore-indirect 
org-fold-core--optimise-for-huge-buffers))
            (with-current-buffer buf
               ;; Update folding properties carried over from other
               ;; buffer (implying that current buffer is indirect
@@ -623,9 +624,11 @@ unless RETURN-ONLY is non-nil."
 
 (defun org-fold-core-decouple-indirect-buffer-folds ()
   "Copy and decouple folding state in a newly created indirect buffer.
-This function is mostly indented to be used in `clone-indirect-buffer-hook'."
+This function is mostly intended to be used in
+`clone-indirect-buffer-hook'."
   (when (and (buffer-base-buffer)
-             (eq org-fold-core-style 'text-properties))
+             (eq org-fold-core-style 'text-properties)
+             (not (memql 'ignore-indirect 
org-fold-core--optimise-for-huge-buffers)))
     (org-fold-core--property-symbol-get-create (car 
(org-fold-core-folding-spec-list)))))
 
 ;;; API



reply via email to

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