branch: externals/org commit 17d4b31a8479096a718b99efba4940768c12abca Author: Ihor Radchenko <yanta...@gmail.com> Commit: Ihor Radchenko <yanta...@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-4b7e76579...@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)