forked from mirrors/org-mode
org-element--cache-for-removal: Error out of irrecoverable failure
* lisp/org-element.el (org-element--cache-for-removal): Consider wrong parent to be critical failure: reset the cache and abort current command.
This commit is contained in:
parent
49df468849
commit
e1aebc1a41
|
@ -6700,7 +6700,9 @@ known element in cache (it may start after END)."
|
||||||
(when robust-flag (setq robust-flag nil))))
|
(when robust-flag (setq robust-flag nil))))
|
||||||
(unless (or (org-element-property :parent up)
|
(unless (or (org-element-property :parent up)
|
||||||
(eq 'org-data (org-element-type up)))
|
(eq 'org-data (org-element-type up)))
|
||||||
(org-element--cache-warn "Got element without parent. Please report it to Org mode mailing list (M-x org-submit-bug-report).\n%S" up))
|
(org-element--cache-warn "Got element without parent. Please report it to Org mode mailing list (M-x org-submit-bug-report).\n%S" up)
|
||||||
|
(org-element-cache-reset)
|
||||||
|
(error "org-element--cache: Emergency exit"))
|
||||||
(setq up (org-element-property :parent up)))
|
(setq up (org-element-property :parent up)))
|
||||||
;; We're at top level element containing ELEMENT: if it's
|
;; We're at top level element containing ELEMENT: if it's
|
||||||
;; altered by buffer modifications, it is first element in
|
;; altered by buffer modifications, it is first element in
|
||||||
|
|
Loading…
Reference in New Issue