org-element-at-point: Report POM when parser throws error

* lisp/org-element.el (org-element-at-point): Mention the value of POM
in warning text when `org-element--parse-to' fails with error.
This commit is contained in:
Ihor Radchenko 2021-11-27 12:20:33 +08:00
parent e1aebc1a41
commit c84c71b093
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 1 deletions

View File

@ -7559,8 +7559,9 @@ element ending there."
(condition-case err
(org-element--parse-to pom)
(error
(org-element--cache-warn "Cache corruption detected in %s. Resetting.\n The error was: %S\n Backtrace:\n%S\n Please report this to Org mode mailing list (M-x org-submit-bug-report)."
(org-element--cache-warn "Cache corruption detected in %s::%S. Resetting.\n The error was: %S\n Backtrace:\n%S\n Please report this to Org mode mailing list (M-x org-submit-bug-report)."
(buffer-name (current-buffer))
pom
err
(when (and (fboundp 'backtrace-get-frames)
(fboundp 'backtrace-to-string))