From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko 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 10:10:32 +0800 Message-ID: <871qs2alif.fsf@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57972@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 23 04:10:16 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 1obY8u-000AaW-3i for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 04:10:16 +0200 Original-Received: from localhost ([::1]:34706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obY8s-0008Jb-Mv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Sep 2022 22:10:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obY8h-0008Hh-2K for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 22:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obY8g-00071p-L0 for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 22:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obY8g-0000id-6x for bug-gnu-emacs@gnu.org; Thu, 22 Sep 2022 22:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Sep 2022 02:10:02 +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-submit@debbugs.gnu.org id=B57972.16638989912743 (code B ref 57972); Fri, 23 Sep 2022 02:10:02 +0000 Original-Received: (at 57972) by debbugs.gnu.org; 23 Sep 2022 02:09:51 +0000 Original-Received: from localhost ([127.0.0.1]:38844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obY8V-0000iB-BM for submit@debbugs.gnu.org; Thu, 22 Sep 2022 22:09:51 -0400 Original-Received: from mail-pf1-f173.google.com ([209.85.210.173]:46812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obY8Q-0000hu-BY for 57972@debbugs.gnu.org; Thu, 22 Sep 2022 22:09:49 -0400 Original-Received: by mail-pf1-f173.google.com with SMTP id c198so11007027pfc.13 for <57972@debbugs.gnu.org>; Thu, 22 Sep 2022 19:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=MfJF0gig2g00w9ZESiDoah3Ehg1czHEvfmnUDad5rAo=; b=NpVyJD8xawNqFHgf37HkGPCT26Imiu4hbfiMWl7QOpVVaxCyuIk3arxp+E/yVe0Gtz bOn0IA33K+5TMQqIHMBsCz87mIWPirr8RzvTPA/IkXltvgVuPtHRwI458/Y344sphL7I EdqC7c97kQVrphrC1ev1DeGNasCLADLBUnM4GJMODHqbLufn2qyJzp3ADaQHlNSfbmo+ t+G8I3q2Qpep4pb6DoDUtrX0Gt1HXhIUijnjqRGlTy83VwZnzPstWIh2T2lTsew3tyr6 WEzfumg81YuBMi3ZFD44e0zDvG5YkaiPyNwV5ZTK8B/wvWo6NLdCYQg0bJFTmNl0ZMsk +BMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=MfJF0gig2g00w9ZESiDoah3Ehg1czHEvfmnUDad5rAo=; b=g/KNhtAxvZsCqbqA1LaxhylqtvdNF6bGAFOL9XLin1NuJB3l9mT5HB6eJ8QCbUxULN cDAcv3NrqC7OtSoI2qWWLOIk2qRD29uyJc848B0n+/jggEJpZuLxrVvynLgdumyEUGeM fj/7bc95aJXMoGFFKyc5ZyaRm5DwPoa7lF8Es61sOt+vB14fSZexAaAbCix9P6y3CBvW SmacHcXgbIU1lGUgd8OZpoFezi/SSVMprXEQlI51FiePQ/+Y+CYz82md1PD2aGQivM5U QKTfA6I6Cz8//sBEqz2c6nF1iVAzenCPbGh8eFcPEhJ45zZsReZYSglFnZ4vW3kH9cgs vRdg== X-Gm-Message-State: ACrzQf2bkcXgpr+hiMXfIcbKJpTiRPYELMB/Dqxl8FprG7PzfPLvgxZo vOmldu18bXy0QhnPd1R7uf8= X-Google-Smtp-Source: AMsMyM6P2e0/cGsG+T/GzO8SluHl6FEFPgVQBvrBbGJb/oyHI1qGFq6nMmI2lYQWdopZrnP4viIuFQ== X-Received: by 2002:a05:6a00:2c98:b0:553:e926:c47a with SMTP id ef24-20020a056a002c9800b00553e926c47amr6725920pfb.14.1663898980567; Thu, 22 Sep 2022 19:09:40 -0700 (PDT) Original-Received: from localhost ([1.83.154.224]) by smtp.gmail.com with ESMTPSA id t4-20020a625f04000000b00550724f8ea0sm5082390pfb.128.2022.09.22.19.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 19:09:39 -0700 (PDT) In-Reply-To: <83v8pgu3rf.fsf@gnu.org> 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:243445 Archived-At: Eli Zaretskii 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