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

From: Ihor Radchenko <[email-masked]>
Date: Wed, 21 Sep 2022 19:41:46 +0800

Eli Zaretskii <[email-masked]> writes:

> Would it be possible to have more info about the details?  Like what
> are org-element-cache-reset and org-element-citation-prefix-re, and
> how do they enter the picture in the above scenario?

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.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92