[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 2f8e688516 2/7: org-back-to-heading-or-point-min: R
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 2f8e688516 2/7: org-back-to-heading-or-point-min: Rely less on cache |
Date: |
Sun, 12 Jun 2022 05:57:45 -0400 (EDT) |
branch: externals/org
commit 2f8e688516e6eeb464a29dff4f51a32f117b8342
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-back-to-heading-or-point-min: Rely less on cache
* lisp/org.el (org-before-first-heading-p): Do not try to parse the
whole section when there is no cached element at point.
---
lisp/org.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 080962cdb1..94eafb393b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19797,14 +19797,15 @@ instead of back to heading."
(defun org-before-first-heading-p ()
"Before first heading?
Respect narrowing."
- (if (org-element--cache-active-p)
- (let ((cached-headline (org-element-lineage (org-element-at-point)
'(headline) t)))
- (or (not cached-headline)
- (< (org-element-property :begin cached-headline) (point-min))))
- (org-with-limited-levels
- (save-excursion
- (end-of-line)
- (null (re-search-backward org-outline-regexp-bol nil t))))))
+ (let ((cached (org-element-at-point nil 'cached)))
+ (if cached
+ (let ((cached-headline (org-element-lineage cached '(headline) t)))
+ (or (not cached-headline)
+ (< (org-element-property :begin cached-headline) (point-min))))
+ (org-with-limited-levels
+ (save-excursion
+ (end-of-line)
+ (null (re-search-backward org-outline-regexp-bol nil t)))))))
(defun org-at-heading-p (&optional invisible-not-ok)
"Return t if point is on a (possibly invisible) heading line.
- [elpa] externals/org updated (ed6f8dc67f -> f5c9ce8f06), ELPA Syncer, 2022/06/12
- [elpa] externals/org 147ca39750 3/7: org-in-commented-heading-p: Do not parse section unless already cached, ELPA Syncer, 2022/06/12
- [elpa] externals/org 2f8e688516 2/7: org-back-to-heading-or-point-min: Rely less on cache,
ELPA Syncer <=
- [elpa] externals/org 8a0b03fb3b 1/7: org-element-headline-parser: Fix headings like * COMMENTnospace, ELPA Syncer, 2022/06/12
- [elpa] externals/org f51c286716 4/7: org-export-get-footnote-definition: Pre-cache references in parse tree, ELPA Syncer, 2022/06/12
- [elpa] externals/org f5c9ce8f06 7/7: org-babel-exp-process-buffer: Disable edit control while processing, ELPA Syncer, 2022/06/12
- [elpa] externals/org 84c89ea7cb 6/7: org-export-resolve-id-link: Pre-cache all the ids in the parse tree, ELPA Syncer, 2022/06/12
- [elpa] externals/org 792cd4b0a6 5/7: org-export-resolve-fuzyy-link: Pre-cache all possible search cells, ELPA Syncer, 2022/06/12