forked from mirrors/org-mode
org-element--cache-for-removal: Improve performance
* lisp/org-element.el (org-element--cache-for-removal): Directly check for headline at point instead of running full `org-element--current-element' that is matching a large number of regexps.
This commit is contained in:
parent
46df681336
commit
93821b431c
|
@ -6909,7 +6909,8 @@ known element in cache (it may start after END)."
|
|||
(not (> end (org-element-property :end up)))
|
||||
(let ((current (org-with-point-at (org-element-property :begin up)
|
||||
(org-element-with-disabled-cache
|
||||
(org-element--current-element (point-max))))))
|
||||
(and (looking-at-p org-element-headline-re)
|
||||
(org-element-headline-parser nil t))))))
|
||||
(when (eq 'headline (org-element-type current))
|
||||
(org-element--cache-log-message
|
||||
"Found non-robust headline that can be updated individually: %S"
|
||||
|
|
Loading…
Reference in a new issue