[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 17d4b31 2/2: org-element--cache-before-change: Make
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 17d4b31 2/2: org-element--cache-before-change: Make sure that rx expr is always valid |
Date: |
Mon, 22 Nov 2021 06:57:25 -0500 (EST) |
branch: externals/org
commit 17d4b31a8479096a718b99efba4940768c12abca
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-element--cache-before-change: Make sure that rx expr is always valid
* lisp/org-element.el (org-element--cache-before-change): Make sure
that we never construct (repeat 1 0 "*") rx expr.
Hopefully fixes
https://list.orgmode.org/d8749145-29b9-39d6-5bbe-4b7e765792e5@ctpowe.net/T/#u
---
lisp/org-element.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 59200dc..b47fba9 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6534,7 +6534,8 @@ The function returns the new value of
`org-element--cache-change-warning'."
(let (min-level)
(cl-loop while (re-search-forward
(rx-to-string
- (if min-level
+ (if (and min-level
+ (> min-level 1))
`(and bol (repeat 1 ,(1-
min-level) "*") " ")
`(and bol (+ "*") " ")))
bottom t)