From: Eli Zaretskii <eliz@gnu.org>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: 57972@debbugs.gnu.org
Subject: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body
Date: Wed, 21 Sep 2022 18:49:08 +0300 [thread overview]
Message-ID: <83v8pgu3rf.fsf@gnu.org> (raw)
In-Reply-To: <CACnOyiiPf1F+JbiE9ZwC9KG2+s9vEH8+vrg7zKYF4L=rW1EDJQ@mail.gmail.com> (message from Ihor Radchenko on Wed, 21 Sep 2022 22:51:16 +0800)
> From: Ihor Radchenko <yantar92@gmail.com>
> Date: Wed, 21 Sep 2022 22:51:16 +0800
> Cc: 57972@debbugs.gnu.org
>
> And another thing: do you have any clue (or maybe more than a clue)
> what changes in Org wrt what's on the Emacs master branch could have
> caused this? If you do, can you show those changes, or point to the
> specific places in Org files where those changes can be eye-balled?
>
> I bisected Org repo and found the first bad commit. Unfortunately, it is not very useful.
>
> The commit changed the order function calls in org-mode. Before the commit,
> `org-setup-filling' got called prior to `org-element-cache-reset' and
> `org-setup-filling' has an explicit (require 'org-element) statement, which
> made autoloading unnecessary in the past.
OK, that explains the problem, I think.
> I can generate an alternative backtrace using debug-on-entry org-mode.
> The debug buffer right before error is below
Thanks. However, even before I look deeper into the backtrace, it
sounds like the problem looks us right in our face. The snippet from
org.el I posted earlier, i.e.
(or (eq this-command 'eval-buffer) <<<<<<<<<<<<<<<<<<<<<
(condition-case nil
(load (concat (file-name-directory load-file-name)
"org-loaddefs")
nil t nil t)
(error
(message "WARNING: No org-loaddefs.el file could be found from where org.el is loaded.")
(sit-for 3)
(message "You need to run \"make\" or \"make autoloads\" from Org lisp directory")
(sit-for 3))))
explicitly avoids loading org-loaddefs.el if org.el was loaded via
eval-buffer. Which is exactly the case here, isn't it, and explains
why the loaddefs aren't loaded?
So now the question becomes: why does org.el treat eval-buffer in this
special way? Perhaps because of byte-compilation or something?
next prev parent reply other threads:[~2022-09-21 15:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 8:33 bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body Ihor Radchenko
2022-09-21 11:35 ` Eli Zaretskii
2022-09-21 11:41 ` Ihor Radchenko
2022-09-21 11:55 ` Lars Ingebrigtsen
2022-09-21 12:08 ` Ihor Radchenko
2022-09-21 12:17 ` Lars Ingebrigtsen
2022-09-21 12:32 ` Ihor Radchenko
2022-09-21 12:46 ` Eli Zaretskii
2022-09-21 13:00 ` Ihor Radchenko
2022-09-21 13:14 ` Eli Zaretskii
2022-09-21 13:19 ` Ihor Radchenko
2022-09-21 14:04 ` Eli Zaretskii
2022-09-21 14:10 ` Ihor Radchenko
2022-09-21 14:27 ` Eli Zaretskii
2022-09-21 14:51 ` Ihor Radchenko
2022-09-21 15:49 ` Eli Zaretskii [this message]
2022-09-23 2:10 ` Ihor Radchenko
2022-09-23 7:14 ` Eli Zaretskii
2022-09-23 21:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-25 2:43 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83v8pgu3rf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=57972@debbugs.gnu.org \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).