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

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

[elpa] externals/org 96944e8d43 1/6: org-fold-core--process-delayed: Fix


From: ELPA Syncer
Subject: [elpa] externals/org 96944e8d43 1/6: org-fold-core--process-delayed: Fix delayed folding in killed buffers
Date: Fri, 2 Feb 2024 12:58:50 -0500 (EST)

branch: externals/org
commit 96944e8d43a06ce85a676dfe4ad73a804310ef1f
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

     org-fold-core--process-delayed: Fix delayed folding in killed buffers
    
    * lisp/org-fold-core.el (org-fold-core--process-delayed): Do not fold
    when markers point to killed buffers.
---
 lisp/org-fold-core.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index 610eae2596..9c148d328d 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -1357,7 +1357,9 @@ Pass the same FROM, TO, FLAG, and SPEC-OR-ALIAS."
   "Perform folding for `org-fold-core--region-delayed-list'."
   (when org-fold-core--region-delayed-list
     (mapc (lambda (args)
-            (when (< (nth 0 args) (nth 1 args))
+            (when (and (buffer-live-p (marker-buffer (nth 0 args)))
+                       (buffer-live-p (marker-buffer (nth 1 args)))
+                       (< (nth 0 args) (nth 1 args)))
               (org-with-point-at (car args)
                 (apply #'org-fold-core-region args))))
           ;; Restore the initial folding order.



reply via email to

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