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 20:08:44 +0800

Lars Ingebrigtsen <[email-masked]> writes:

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

Debugger entered--entering a function:
* message("File mode specification error: %s" (void-function org-element-cache-reset))
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer bug.org> "/tmp/bug.org" nil nil "/tmp/bug.org" (127741036 26))
  find-file-noselect("/tmp/bug.org" nil nil t)
  find-file("/tmp/bug.org" t)
  funcall-interactively(find-file "/tmp/bug.org" t)
  command-execute(find-file)

I generated the backtrace using M-x debug-on-entry org-mode and opening
bug.org. The backtrace appears at the moment I try to step through
org-element-cache-reset call inside org-mode.

-- 
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