unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 57972-done@debbugs.gnu.org, Ihor Radchenko <yantar92@gmail.com>
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 17:13:50 -0400	[thread overview]
Message-ID: <jwvilldkdcb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <838rmar29i.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 23 Sep 2022 10:14:17 +0300")

>> Side question: Could you point me towards documentation on how to
>> properly do autoloading in Emacs packages? Maybe Org is doing things
>> wrongly?
>
> I think Org basically does what other packages do, which is explicitly
> load the *-loaddefs.el in some central place.  I don't think we have
> any magic anywhere to do that any other way.

Indeed, that's the usual way (except for the weird (eq
this-command 'eval-buffer):

    % grep '(\(load\|require\).*-loaddefs' **/*.el
    lisp/calc/calc.el:(load "calc-loaddefs.el" nil t)
    lisp/calendar/calendar.el:(load "cal-loaddefs" nil t)
    lisp/calendar/diary-lib.el:(eval-and-compile (load "diary-loaddefs" nil t))
    lisp/calendar/holidays.el:(load "holiday-loaddefs" nil t)
    lisp/dired.el:(require 'dired-loaddefs nil t)
    lisp/emacs-lisp/cl-lib.el:(unless (load "cl-loaddefs" 'noerror 'quiet)
    lisp/erc/erc.el:(load "erc-loaddefs" 'noerror 'nomessage)
    lisp/ibuffer.el:(require 'ibuffer-loaddefs)
    lisp/mh-e/mh-e.el:(require 'mh-loaddefs)
    lisp/net/tramp-cache.el:(require 'tramp-loaddefs)
    lisp/net/tramp.el:(require 'tramp-loaddefs)
    lisp/ps-print.el:(require 'ps-print-loaddefs)
    lisp/textmodes/reftex.el:(require 'reftex-loaddefs)
    lisp/textmodes/texinfo.el:(require 'texinfo-loaddefs)
    %


-- Stefan






  reply	other threads:[~2022-09-23 21:13 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
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 [this message]
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=jwvilldkdcb.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=57972-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --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).