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

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

[elpa] externals/org 6998536 5/9: org-element-cache: Consider non-PROPER


From: ELPA Syncer
Subject: [elpa] externals/org 6998536 5/9: org-element-cache: Consider non-PROPERTIES drawers robust
Date: Wed, 15 Dec 2021 23:57:29 -0500 (EST)

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

    org-element-cache: Consider non-PROPERTIES drawers robust
    
    * lisp/org-element.el (org-element--cache-for-removal): Drawers are
    generally robust elements (they cannot be changed if a non-sensitive
    change is made inside their contents).  The only exception is
    PROPERTIES drawer that may switch back and forth between ordinary
    drawer and properties drawer depending on its contents.  The old code
    treated all possible drawer as non-robust for this reason, degrading
    performance on large LOGBOOK drawers that are now processed much
    faster since they do not need to be removed and re-parsed on every
    single change.
---
 lisp/org-element.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 30721fe..2e1c108 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6631,7 +6631,10 @@ known element in cache (it may start after END)."
        (while up
          (if (let ((type (org-element-type up)))
                 (or (and (memq type '( center-block dynamic-block
-                                       quote-block special-block))
+                                       quote-block special-block
+                                       drawer))
+                         (or (not (eq type 'drawer))
+                             (not (string= "PROPERTIES" (org-element-property 
:drawer-name up))))
                          ;; Sensitive change.  This is
                          ;; unconditionally non-robust change.
                          (not org-element--cache-change-warning)



reply via email to

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