From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <83edw4vqsq.fsf@gnu.org> <838rmcvphe.fsf@gnu.org> <8335ckvn5p.fsf@gnu.org> <83zgesu7jz.fsf@gnu.org> <83v8pgu3rf.fsf@gnu.org> <871qs2alif.fsf@localhost> <838rmar29i.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7317"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57972-done@debbugs.gnu.org, Ihor Radchenko To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 23 23:15:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1obq0r-0001ig-UV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 23:15:10 +0200 Original-Received: from localhost ([::1]:33156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obq0q-0003g0-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 17:15:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obq0k-0003fq-Fa for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 17:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obq0k-0008Jn-7p for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 17:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obq0j-0008A8-NA for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 17:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Sep 2022 21:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57972 X-GNU-PR-Package: emacs Original-Received: via spool by 57972-done@debbugs.gnu.org id=D57972.166396764331295 (code D ref 57972); Fri, 23 Sep 2022 21:15:01 +0000 Original-Received: (at 57972-done) by debbugs.gnu.org; 23 Sep 2022 21:14:03 +0000 Original-Received: from localhost ([127.0.0.1]:41859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obpzm-00088V-9T for submit@debbugs.gnu.org; Fri, 23 Sep 2022 17:14:02 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obpzk-000881-Cy for 57972-done@debbugs.gnu.org; Fri, 23 Sep 2022 17:14:00 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7F47D10013B; Fri, 23 Sep 2022 17:13:53 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 642081000EF; Fri, 23 Sep 2022 17:13:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1663967631; bh=twLEICZN6Numaa1Q4ggasBr4hfQkeKh+vROTJguxmSI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=N4L+KNn2YfWVyhyBcxMFdc8Ct4HvNuI7sAb+K6eoOH2Cj9ls7PmOR+I2X2VXibLTx jQbhkpOxIjdsQYF+QoGjSBEMVEOktn14sMNLbiRISb1EIxq0erYDW++/Br8i1ff6Xq zOq+RcHLjngN5KK973eaFq65hoLf4IbW9P0CL9ptWUWrDzAU6eUPRnqM4ArQSTLRGS QD6Jd2iMwEGKP/lQXneXJ59+oVGhUv0jk2wBHCDS2zutZmhu0eI1OG1OtS8cRdzF7V bIFh/hUH5jcilFwuEXafmjF9eZ3sVfXOcuKxTvykd0sA/6l/oySDx+c7GTsIAqDA4E 3yqsjpvlY6Pyw== Original-Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4179E1203D7; Fri, 23 Sep 2022 17:13:51 -0400 (EDT) In-Reply-To: <838rmar29i.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 23 Sep 2022 10:14:17 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243499 Archived-At: >> 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