GNU bug report logs -
#57972
29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> gmail.com>
Date: Wed, 21 Sep 2022 08:34:01 UTC
Severity: normal
Found in version 29.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #53 received at 57972 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> (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?
I have no clue. I will ask Bastien (he authored this piece of code).
I hence see this Emacs bug report as resolved (it is not an Emacs bug).
Side question: Could you point me towards documentation on how to
properly do autoloading in Emacs packages? Maybe Org is doing things
wrongly?
--
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
This bug report was last modified 2 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.