Subject: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 21 Sep 2022 13:55:40 +0200

Ihor Radchenko <[email-masked]> writes:

> Let's forget about org-element-citation-prefix-re for now.
>
> org-element-cache-reset is an autoloaded function defined inside
> org-element.el
>
> Major mode body `org-mode' from org.el is calling
> `org-element-cache-reset' as part of Org mode loading.
>
> org.el does not contain (require 'org-element).
> Instead, it is assumed that `org-element-cache-reset' is autoloaded by
> Emacs.
>
> Let me know if something is not clear or if you need more detailed
> steps.

I'm not at all sure I understand myself.  A backtrace here would be
helpful.