bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57972: 29.0.50; Autoloaded function raises (void-function org-elemen


From: Ihor Radchenko
Subject: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body
Date: Fri, 23 Sep 2022 10:10:32 +0800

Eli Zaretskii <eliz@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]