From unknown Sun Aug 17 09:10:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#57972 <57972@debbugs.gnu.org> To: bug#57972 <57972@debbugs.gnu.org> Subject: Status: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body Reply-To: bug#57972 <57972@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:10:59 +0000 retitle 57972 29.0.50; Autoloaded function raises (void-function org-elemen= t-cache-reset) when called within major-mode body reassign 57972 emacs submitter 57972 Ihor Radchenko severity 57972 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 04:33:09 2022 Received: (at submit) by debbugs.gnu.org; 21 Sep 2022 08:33:09 +0000 Received: from localhost ([127.0.0.1]:60587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oavAJ-0005Sq-6D for submit@debbugs.gnu.org; Wed, 21 Sep 2022 04:33:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:48752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oavA6-0005SC-AT for submit@debbugs.gnu.org; Wed, 21 Sep 2022 04:33:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oavA4-00063E-Fh for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 04:32:54 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:35400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oavA2-0007Hr-Fi for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 04:32:52 -0400 Received: by mail-pj1-x1034.google.com with SMTP id q35-20020a17090a752600b002038d8a68fbso9477517pjk.0 for ; Wed, 21 Sep 2022 01:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date; bh=53Ce5y4FlVWSkG2+VyCoFbCRr+FBUjb6521cYr5EEso=; b=n6Vq3KF/lNc0bqPQXy4KcoNJV8/LT6ONQHOZR/zCFxNQNRaKFjHSk07jIAiclBydAp y5yisJ3Cst7OZ+7JXXajs4c/DtRyg/+GQg1umIqZpKY1PwRAHt0S9/nklWCir5pBQTYR 5Kry84B+9kJ4fnlsP9ozBDkwn1JgaABSP/RoFfBlfs3WRaTo+2vUGd3savlgqVZx4WIs U/BuelD1ByEJAbjaZRb1rv2yiXgqFaRo0HQtbFqH4Ztq0qY/m4sraS4MT+SvLua4Erj0 cjTZTNnOvPNvZyQq7tXAB9q0uuJkyHHXBvH3umfatv3qjBtcIJ2EoYclAIDH02KHU1Qz 3GRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date; bh=53Ce5y4FlVWSkG2+VyCoFbCRr+FBUjb6521cYr5EEso=; b=qi1t4N153GdLaOiy7YFeky0gdALL7HEz3KxI8ZgZOnYkW3Nt1KEdwUDBj4xXvE8hqr qRuvWeCtlKn3iKmMmmTJPLjQH2PdKtwTilq+z4rXCfjxos3SSvnb/kZbZN+J9YiYV2GI YUy5JfHA8cgLWPjQ+Fy6/WCd8J9f8O1HgPZMdZdnCoZGhFCj8nMkdzXBuJSND1FEc8lu XCsiyIb06o/zkF/H1vd1MYnlb2J/1jnoxOAnYXr5tl2R7Uyn2gAi1Y63Ddo4me+yFhVA ZKhcDXGQxRRN0WLpH/01C00QRhcBCOV27dF2BNDEHiOi7n6/fIClldE1BFJc1LS7aXQZ LpAQ== X-Gm-Message-State: ACrzQf0qZRDUfhkK3hMlYzrPR6Y+9YrhryVnfcZWomVfLj68Wyxea7I2 0Mr/C6qAjz81z1BixkPLK64Pw0ZjYpo= X-Google-Smtp-Source: AMsMyM6YYlxhatja5yNqnhv4lBDiM52zgX15fkQL3MSXaywkcmJgBUG4dEYwlTprkyZDQbXlCCvU9g== X-Received: by 2002:a17:902:e808:b0:178:1520:b255 with SMTP id u8-20020a170902e80800b001781520b255mr3593131plg.54.1663749168109; Wed, 21 Sep 2022 01:32:48 -0700 (PDT) Received: from localhost ([1.83.154.224]) by smtp.gmail.com with ESMTPSA id d80-20020a621d53000000b0053e6d352ae4sm1501603pfd.24.2022.09.21.01.32.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 01:32:45 -0700 (PDT) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body Date: Wed, 21 Sep 2022 16:33:39 +0800 Message-ID: <87fsglxh24.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1034.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, I am forwarding a bug report from Org mode. I am able to reproduce the reported steps (see below) and I find that the void-function error is raised when calling (org-mode). `org-mode' body calls `org-element-cache-reset', which should be autolo [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (yantar92[at]gmail.com) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (yantar92[at]gmail.com) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Hi, I am forwarding a bug report from Org mode. https://list.orgmode.org/4a9d4298-4af6-3e11-63c3-87bf7125f61b@oracle.com/T/= #u I am able to reproduce the reported steps (see below) and I find that the void-function error is raised when calling (org-mode). `org-mode' body calls `org-element-cache-reset', which should be autoloaded from org-element.el. Yet, void-function error is raised. I either misunderstand something about autoload or it is some kind of Emacs bug. Steps to reproduce: https://list.orgmode.org/4a9d4298-4af6-3e11-63c3-87bf7125f61b@oracle.com/T/= #u Org mode version is the latest from https://git.savannah.gnu.org/cgit/emacs/org-mode.git/ > I ran this: > dortmann@ddo-linux:.emacs.d$ emacs -Q --debug-init asdf.el > ... and then ran eval-buffer. >=20 > Where asdf.el has this content: > (add-to-list 'load-path "/home/dortmann/src/git-org-mode/lisp") > (require 'org) >=20 > (setq org-capture-templates > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(("c" "Item to current clocked task" che= ckitem > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (clock) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "%i%?" :prepend t :empty-lines 1))) >=20 > Then I loaded asdf.org which has this: > * TODO start clock on this test item > These two lines are in my *Messages* buffer: > File mode specification error: (void-function org-element-cache-reset) > Error during redisplay: (jit-lock-function 1) signaled (void-variable=20 > org-element-citation-prefix-re) In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2022-09-07 built on localhost Repository revision: 473313d2a85a7ae73daf5cc7c205f6285286eecf Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Gentoo Linux --=20 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 07:36:11 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 11:36:11 +0000 Received: from localhost ([127.0.0.1]:60915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oay1T-0000II-2R for submit@debbugs.gnu.org; Wed, 21 Sep 2022 07:36:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oay1N-0000Hk-ND for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 07:36:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oay18-0008CU-IN; Wed, 21 Sep 2022 07:35:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=yloFWhirO8TrRrERag752SBVpsOA/m07fRy89Y34xno=; b=pA0fRXB6lk4617sfAtfb JyPnaAonFsEZipVrbWalTDjcUq4FErUP8gmplSTha3bW4rzYlbhBm+jp9jIPhVZxY2oDiYg7XAOr+ bte4quDLT8rvgDkl7fQoKwTPC2KMcs8pmjMPhNPqM1I4OuuAfBX1eVb7RKNyQBx4n2qjt8PDqCv4u fF3NsUZkR7iUhyyaPvEMfXCUuka2FW8UtD/e7YQvizdeZW+H/QgaRaixK35r320ifo//f9UuAOrWj 7d8GFbbYlza/32ZFPkmPdsVNRpqJbuiPWl4LcLPZhGdJuvNnRQZlAcxrtrZZrRUqHfQBlAYK/TY88 7XVRBXNg6BYBbw==; Received: from [87.69.77.57] (port=3474 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oay15-0000FF-UX; Wed, 21 Sep 2022 07:35:50 -0400 Date: Wed, 21 Sep 2022 14:35:56 +0300 Message-Id: <83k05xufhf.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87fsglxh24.fsf@localhost> (message from Ihor Radchenko on Wed, 21 Sep 2022 16:33:39 +0800) Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body References: <87fsglxh24.fsf@localhost> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Wed, 21 Sep 2022 16:33:39 +0800 > > I am forwarding a bug report from Org mode. > https://list.orgmode.org/4a9d4298-4af6-3e11-63c3-87bf7125f61b@oracle.com/T/#u > > I am able to reproduce the reported steps (see below) and I find that > the void-function error is raised when calling (org-mode). `org-mode' > body calls `org-element-cache-reset', which should be autoloaded from > org-element.el. Yet, void-function error is raised. > > I either misunderstand something about autoload or it is some kind of > Emacs bug. > > Steps to reproduce: > > https://list.orgmode.org/4a9d4298-4af6-3e11-63c3-87bf7125f61b@oracle.com/T/#u > > Org mode version is the latest from > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/ > > > I ran this: > > dortmann@ddo-linux:.emacs.d$ emacs -Q --debug-init asdf.el > > ... and then ran eval-buffer. > > > > Where asdf.el has this content: > > (add-to-list 'load-path "/home/dortmann/src/git-org-mode/lisp") > > (require 'org) > > > > (setq org-capture-templates > >       `(("c" "Item to current clocked task" checkitem > >        (clock) > >        "%i%?" :prepend t :empty-lines 1))) > > > > Then I loaded asdf.org which has this: > > * TODO start clock on this test item > > > These two lines are in my *Messages* buffer: > > File mode specification error: (void-function org-element-cache-reset) > > Error during redisplay: (jit-lock-function 1) signaled (void-variable > > org-element-citation-prefix-re) Would it be possible to have more info about the details? Like what are org-element-cache-reset and org-element-citation-prefix-re, and how do they enter the picture in the above scenario? TIA From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 07:41:03 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 11:41:03 +0000 Received: from localhost ([127.0.0.1]:60930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oay6A-0000Qc-M2 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 07:41:02 -0400 Received: from mail-pf1-f175.google.com ([209.85.210.175]:36479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oay68-0000Ps-Fg for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 07:41:00 -0400 Received: by mail-pf1-f175.google.com with SMTP id y136so5652430pfb.3 for <57972@debbugs.gnu.org>; Wed, 21 Sep 2022 04:41:00 -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=MOm84idHgpxRKB7i7fGPlk5Uuq1HXdegOnNay74fB/4=; b=kJ8pHbGKuoht+UGeWsgpv8N2dVRsodxhHJnC0rcglf7UnRyN401qxAGuuQ/layt9lh q78mfT4uakDO4PcaJY3d5FIaFfJMWytk/IJnwv77+t+L0FFZmQIDFhNxoSaZ+FhWK7I4 oot+LvDC0V20Mxc0jwEGbo1GM197BbqiGPdWBqve7KQFJ1cJBCQsqTa2FenaxysIjxjc LuogqZLmRlY6VnPAM8bMPnAoWq+V05t+5x0qrTfq9Ojk9ZpzE9JvxaRPHCGGr54HS7FF tLe/vLRPuyf2jIMdYxxbacNh9V3GaaTAMsDn+7V/mnjd/tI2tpq54bQfrExcTysvksbQ JiOA== 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=MOm84idHgpxRKB7i7fGPlk5Uuq1HXdegOnNay74fB/4=; b=N/nz+dk73wERATn3vFSdnB9yZj7BrE1+WOYOwnQ938WAwZ9PVDVLHT1SK6J+1juCL7 woKBfNeorBQ+0pk6zwkWpZXLBnAi81f8+nhR7oe7xrq88woGDRN71weDO65UMA+bvzZA MCBPh0S7QeFC8bebdXWRQYwA+nB/aqizJWzHztuFnoKXX3gN54r4AX+MDF6lgdCqFjGe d91l0GTxqssf2PF1CVhVPkWgTGfL2LVI2jw2aQEfwjQ5WYWrGdkNSTFS0eQMHB9LRP1Z rBGKCx7u5QxA38eMxi0yeiR618qoMsm+M9ycE8r0i6ehUtPM7zfcd8MBTBjUeAsp5gxn +Zcg== X-Gm-Message-State: ACrzQf0mSG1T1vlStSbhIjdtL74cMGbZ4vvyPY0TuUJk2tGnxTdQWLkb iMOUSuYMlDyt2xrj+ncYS4Q= X-Google-Smtp-Source: AMsMyM7M60KvOhvw/K7ssyM8e+sLv+/ovlPB066aoZ1HM5FtUZ5/B7p1egciVn/Z+HF2Z8ar+IctFw== X-Received: by 2002:a65:4bc1:0:b0:439:e6a5:122a with SMTP id p1-20020a654bc1000000b00439e6a5122amr16723273pgr.443.1663760454394; Wed, 21 Sep 2022 04:40:54 -0700 (PDT) Received: from localhost ([2409:8a70:2b5:ad00:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id x8-20020a628608000000b005409c9d2d41sm1916109pfd.62.2022.09.21.04.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 04:40:53 -0700 (PDT) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body In-Reply-To: <83k05xufhf.fsf@gnu.org> References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> Date: Wed, 21 Sep 2022 19:41:46 +0800 Message-ID: <8735clx8cl.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Eli Zaretskii writes: > Would it be possible to have more info about the details? Like what > are org-element-cache-reset and org-element-citation-prefix-re, and > how do they enter the picture in the above scenario? Let's forget about org-element-citation-prefix-re for now. org-element-cache-reset is an autoloaded function defined inside org-element.el Major mode body `org-mode' from org.el is calling `org-element-cache-reset' as part of Org mode loading. org.el does not contain (require 'org-element). Instead, it is assumed that `org-element-cache-reset' is autoloaded by Emacs. Let me know if something is not clear or if you need more detailed steps. -- 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 07:55:50 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 11:55:50 +0000 Received: from localhost ([127.0.0.1]:60997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayKU-00034r-D1 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 07:55:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayKS-00034b-Po for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 07:55:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YBVZFRTgyIQ/WmXVBmut4vNmGNmEKpTMNuup/JCzAIE=; b=XQ+JmBx7cXl8cAqYqzU4pCKD5W m6+Pzx8xoS+XeZl93T3/9I0fsAA/a8ClfXT+R6ZOHTDcCVppRrndFsy/IqJWuzpgtNgQl5aPyxZK1 WHsQuKCm9prnqqv8ZvMZjNV4WzwI3aH0TYESqKQefhq/Jl26Srz1bSqDLve4M+rs0zoI=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oayKK-0004jn-SN; Wed, 21 Sep 2022 13:55:42 +0200 From: Lars Ingebrigtsen To: Ihor Radchenko Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body In-Reply-To: <8735clx8cl.fsf@localhost> (Ihor Radchenko's message of "Wed, 21 Sep 2022 19:41:46 +0800") References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> X-Now-Playing: Niki Mono's _Contradictions are a Luxury_: "In A Rush" Date: Wed, 21 Sep 2022 13:55:40 +0200 Message-ID: <875yhh6iwz.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Ihor Radchenko writes: > Let's forget about org-element-citation-prefix-re for now. > > org-element-cache-reset is an autoloaded function defined inside > org-element.el > > Major mode body `org-mode' from org.el is calling [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ihor Radchenko writes: > Let's forget about org-element-citation-prefix-re for now. > > org-element-cache-reset is an autoloaded function defined inside > org-element.el > > Major mode body `org-mode' from org.el is calling > `org-element-cache-reset' as part of Org mode loading. > > org.el does not contain (require 'org-element). > Instead, it is assumed that `org-element-cache-reset' is autoloaded by > Emacs. > > Let me know if something is not clear or if you need more detailed > steps. I'm not at all sure I understand myself. A backtrace here would be helpful. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 08:08:06 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 12:08:06 +0000 Received: from localhost ([127.0.0.1]:32793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayWI-0005ae-AP for submit@debbugs.gnu.org; Wed, 21 Sep 2022 08:08:06 -0400 Received: from mail-pj1-f44.google.com ([209.85.216.44]:44610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayWD-0005a9-RN for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 08:08:01 -0400 Received: by mail-pj1-f44.google.com with SMTP id i15-20020a17090a4b8f00b0020073b4ac27so5588750pjh.3 for <57972@debbugs.gnu.org>; Wed, 21 Sep 2022 05:07:57 -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=VWJXIXMEJLiOQVKC4Sk30vbgkQvBpfKAMZrrDDUnhto=; b=IxR+mZ0OFp3FmUtt2MjkX1yJI9l/0UfABfTdtw3IWZR5K6j94BVgKLmq7cocAXnahr 33yAOM0pheXSr45PeqGbNl8nKhc1Hoze87A8URtGGjdkyi7NPCOQPP3L2vEUSY4qlwfS QTqelcr3zm19EJaqVfwkrEM607vY90VfOGo9o24SxPOTTb0N6aQKCG17D8bUsqcOCobc /IL1dO7k3Dnik7nJT06FPBB37pcgUKSfl/fnZhA1DHGshnSlXbUClQId1WmyMO7Io+v+ n9bwLnnBFU5L1oM6hNmTLdRtbBaCJDTQjx92EP1Cws0GWkUG2BnXNE1ckT6oya/bTZm2 qHZA== 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=VWJXIXMEJLiOQVKC4Sk30vbgkQvBpfKAMZrrDDUnhto=; b=g0fUlJZXrVzZlzaNhp7U3e5NB1z+DRVfFwptk57ijKxf2gz3DHdoLdS7qj9kntCUfB NWGItu1KOe5+F5cAGrp+mG9rWRKuhfiEPPAQo8whh3zQ8GE+XvxmGLurQW2AksDpbMDn m1aW8kgeVS1kWyCMjBrp0MKI8Sia9cpaajNbTVpGDHRxBdRgHxZNGb3F85B014p5qdmP Z8Aaoh88YwjtYmin7xT8105U5xS+Iw2f0Y54MGG/Pg7HtuZUkfq2jLnRIu16g0DyO8ug 675forT5t/YFiyKtqjvqpT7w0hFJHT+UbpHAhEIQwkK8wQnchHzdSZftILaWpasoD0KT 55ig== X-Gm-Message-State: ACrzQf3gWlz+ua9/44ZaY1AcazhA8pWcJAdyNgqz71QwA1mEI9cTLgAn I89OOC8jGHEXdxo/Glj9MhU= X-Google-Smtp-Source: AMsMyM6VTdo0jeadp8q5KjMn7H5sGky/n+NKP3i/GbL0vAFtyDOdEfEVnDCgR+jSxaRlTonniB00mQ== X-Received: by 2002:a17:902:c944:b0:178:4568:9f99 with SMTP id i4-20020a170902c94400b0017845689f99mr4540483pla.98.1663762072050; Wed, 21 Sep 2022 05:07:52 -0700 (PDT) Received: from localhost ([2409:8a70:2b5:ad00:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id cx1-20020a17090afd8100b002036006d65bsm1694053pjb.39.2022.09.21.05.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 05:07:50 -0700 (PDT) From: Ihor Radchenko To: Lars Ingebrigtsen Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body In-Reply-To: <875yhh6iwz.fsf@gnus.org> References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <875yhh6iwz.fsf@gnus.org> Date: Wed, 21 Sep 2022 20:08:44 +0800 Message-ID: <87zgetvsj7.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Lars Ingebrigtsen writes: > I'm not at all sure I understand myself. A backtrace here would be > helpful. Debugger entered--entering a function: * message("File mode specification error: %s" (void-function org-element-cache-reset)) normal-mode(t) after-find-file(nil t) find-file-noselect-1(# "/tmp/bug.org" nil nil "/tmp/bug.org" (127741036 26)) find-file-noselect("/tmp/bug.org" nil nil t) find-file("/tmp/bug.org" t) funcall-interactively(find-file "/tmp/bug.org" t) command-execute(find-file) I generated the backtrace using M-x debug-on-entry org-mode and opening bug.org. The backtrace appears at the moment I try to step through org-element-cache-reset call inside org-mode. -- 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 08:18:06 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 12:18:06 +0000 Received: from localhost ([127.0.0.1]:32826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayg2-0005rS-50 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 08:18:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayft-0005ql-SP for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 08:18:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fDU7VpsDhnCMF6YMLm4EiwDSEpXhjHIZ2EhtNUZXwpo=; b=kuSNGLWA+e+T1LYM+c+G/R7H+p vR3kqm691qaBv5bx7qcZo1zCF/pK00IrCM9yrLI/5jYrcvlA3MnlPfUX0J7QZKPAhnWs1FkZt7uWP i2YmYqE7tVEfJMlePDKDk1J1DGlxWHWttNWuzZ46QjPXsSZfcm1fhzIsA6fpVgQWaveI=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oayfk-0004zp-SM; Wed, 21 Sep 2022 14:17:51 +0200 From: Lars Ingebrigtsen To: Ihor Radchenko Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body In-Reply-To: <87zgetvsj7.fsf@localhost> (Ihor Radchenko's message of "Wed, 21 Sep 2022 20:08:44 +0800") References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <875yhh6iwz.fsf@gnus.org> <87zgetvsj7.fsf@localhost> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWkRUzBsbE5Jiv/ //9EG+24AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YJFQs7EqVA5nIAAAGjSURBVCjPPZIxa+NAEIVH IgrBlTCWCamSFIe8v2IJOIUrWewITlWK5Ej0K4SwDuHqcpxNksoRkVm9X3mzkslW+82w7808lqYN Lq8vJ7+r+FBSut1O2zccYduSzNXHvH1/OFaLdkP+G+ZoblsAByLywwsi/I2pJPKIdJD3MxpPqGfo H4crU7QsYL9IE635LEoBy1IViFiUOtYCHge5QD8AMeffHQEjwMtE7hEzrwsrpaEhp+hMZMgfwWzM PghPHa6f9gHrE3TP97WAE1jw02KAQKA9MM5ZwGO+24LT0ml7zlS9ZrsT8AqvTmV0zeFkdprCtXnR q4ifYRMy+UZdmGGnhMK0RsOcQeEPUWaxcwAcic56Jc//KbQSoqd6aezc6g5ks6wWsGJUyCR+54IQ 05eAJxgh5J8sJnU6whBPlygnwEuWam8UIoGAV19xw/iciJpXx2w+9sjgwCU4R60GuHUaNnc+RL8q AZnnWgR0al3CWzcN6ysbcHYIaSmmeopPgzoRkM456pUNJAGiGf2wdzYmvyGS33ETwaqyssNP6Aso 1VZQ/wGiGsRQg+CqXwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wOS0yMVQxMTo1OToxOCswMDow MLRFwnsAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDktMjFUMTE6NTk6MTgrMDA6MDDFGHrHAAAA AElFTkSuQmCC X-Now-Playing: The Waitresses's _Wasn't Tomorrow Wonderful?_: "Wasn't Tomorrow Wonderful?" Date: Wed, 21 Sep 2022 14:17:48 +0200 Message-ID: <87k05w6hw3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Ihor Radchenko writes: >> I'm not at all sure I understand myself. A backtrace here would be >> helpful. > > Debugger entered--entering a function: > * message("File mode specification error: %s" (void-function > org-elemen [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ihor Radchenko writes: >> I'm not at all sure I understand myself. A backtrace here would be >> helpful. > > Debugger entered--entering a function: > * message("File mode specification error: %s" (void-function > org-element-cache-reset)) > normal-mode(t) > after-find-file(nil t) > find-file-noselect-1(# "/tmp/bug.org" nil nil > "/tmp/bug.org" (127741036 26)) > find-file-noselect("/tmp/bug.org" nil nil t) > find-file("/tmp/bug.org" t) > funcall-interactively(find-file "/tmp/bug.org" t) > command-execute(find-file) > > I generated the backtrace using M-x debug-on-entry org-mode and opening > bug.org. The backtrace appears at the moment I try to step through > org-element-cache-reset call inside org-mode. You have some confusing stuff in org.el -- you have a (declare-function org-element-cache-reset "org-element" (&optional all)) to suppress warnings in org.el about that function, but org-element-cache-reset should be in org-loaddefs, which org.el loads already, so it should be unnecessary. If it isn't unnecessary, then something else is going wrong somewhere, I'd have thought? But I haven't tried debugging further. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 08:31:32 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 12:31:32 +0000 Received: from localhost ([127.0.0.1]:32852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayt2-0006DY-A9 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 08:31:32 -0400 Received: from mail-lj1-f177.google.com ([209.85.208.177]:37865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oayt0-0006DK-3v for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 08:31:30 -0400 Received: by mail-lj1-f177.google.com with SMTP id j24so6303517lja.4 for <57972@debbugs.gnu.org>; Wed, 21 Sep 2022 05:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=erf1PsXGsNpRfEIl3DPXnp3BZC9pGDHlJPZQz3jn/cY=; b=DygK+MPe+x6SNHKznRUGUNPFu3oRC0eyNA6UwKJnEAVHe7x3K5ASgwLX4gk3fJ/XLz 53StBhcZpRStmoRI9WzTTu3UvmV8Fb3Okv2CAfMyaNkJ0jHzqXnCfzX1K4K6kFsGVpi6 1dFxsdnaObogQDSdxdUNmzmtHrK7GQ262wqoPqJFl0kV+CW0Ilg0olyq2MXM4+L0uxOb SYk0RSfwcMwPBI2rfhURKu2iWO+YEFtKF1MDQjZ1zXNtFy3Dg12WsaKB6mYoQnPoc33H EsspJrUtQXJ5pCuyLnnU8kd+nvPAL1yxpGKJR03X1WGGbI/STQtOAPY1ZAJk4nxhLi3Q f+DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=erf1PsXGsNpRfEIl3DPXnp3BZC9pGDHlJPZQz3jn/cY=; b=VxW2MofRJ2kkwFElxjSJwvL3NuYmg7WrUrjMFdhLI0x0o6q7P8/HzaGvG48Tpq07dH VksaiGnwa02+Epf3B0qTdXHOBSSAJym6M6FGcQ01YaPGRxlS7VN1PPrb42X9OhYfKYg4 Wbo91J/nYSsKBisQYPFDBdo95rAiVg1tcMsIYKJmSgZxhS6iua+pxwIBj5aMpzx1ifj8 Z8ieUmu6ZSk6tSCHVBVlWXfZnY1OmTAOIZYQ/KmaDRNMDOZxT5mrgRTNVBZ9QbD6lF+y npFKeKoCN0dr81S32tIqSGnwsYHNeYI7rJIONIs6ENxBbF1TYIX9KlqR9TeNUHFbn/+J rNyw== X-Gm-Message-State: ACrzQf3+SpCTCVLnMIBy5t9bxQ282gdayfJMHHHxz7CRYOBX3aIKfsS6 0viNV2VSNeoaKMZFJH1hlZB52iSKPK1n1mDx81A= X-Google-Smtp-Source: AMsMyM5gzzRffdBTPgmaXiA/VC16pOxB2tgAUANMA+1eD5nXYyP3U2SB1pddzXGZw63VOK0mhAVxTloS0ecE1jTb464= X-Received: by 2002:a2e:541c:0:b0:26c:16d6:6872 with SMTP id i28-20020a2e541c000000b0026c16d66872mr8595237ljb.220.1663763482667; Wed, 21 Sep 2022 05:31:22 -0700 (PDT) MIME-Version: 1.0 References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <875yhh6iwz.fsf@gnus.org> <87zgetvsj7.fsf@localhost> <87k05w6hw3.fsf@gnus.org> In-Reply-To: <87k05w6hw3.fsf@gnus.org> From: Ihor Radchenko Date: Wed, 21 Sep 2022 20:32:10 +0800 Message-ID: Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="0000000000005ff1db05e92f1f73" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000005ff1db05e92f1f73 Content-Type: text/plain; charset="UTF-8" > > > You have some confusing stuff in org.el -- you have a > > > (declare-function org-element-cache-reset "org-element" (&optional all)) > > > to suppress warnings in org.el about that function, but > > org-element-cache-reset should be in org-loaddefs, which org.el loads > > already, so it should be unnecessary. The declare statement is there for a single reason---to pacify native-comp warnings. If it isn't unnecessary, then something else is going wrong somewhere, > I'd have thought? But I haven't tried debugging further. > I removed the declare statement. The bug persists. Also, org-element-cache-reset is present in org-loaddefs.el Best, Ihor --0000000000005ff1db05e92f1f73 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> You have some confusing stuff in org.el -- you have= a

> (declare-function org-element-cache-reset "org-element" = (&optional all))

> to suppress warnings in org.el about that function, but
> or= g-element-cache-reset should be in org-loaddefs, which org.el loads
>= already, so it should be unnecessary.

The = declare statement is there for a single reason---to pacify native-comp warn= ings.
=C2=A0=C2=A0
=C2=A0If it isn't unnecessar= y, then something else is going wrong somewhere,
I'd have thought?=C2=A0 But I haven't tried debugging further.
<= /blockquote>

I removed the declare statement. The bug pe= rsists. Also, org-element-cache-reset is present in org-loaddefs.el

Best,
Ihor=C2=A0
--0000000000005ff1db05e92f1f73-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 08:46:25 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 12:46:25 +0000 Received: from localhost ([127.0.0.1]:32888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaz7R-0006bI-Gw for submit@debbugs.gnu.org; Wed, 21 Sep 2022 08:46:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaz7P-0006b1-V8 for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 08:46:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaz7K-0005sD-6H; Wed, 21 Sep 2022 08:46:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=R+BxwAY/aIrCHPJ96Ri1kpj+iNr19EdsgS2879k9NnE=; b=QvM959m8iVt/ HIXT/w9vHbnTAlLZF1xLbSWmRw+RHEVtcIjE77NTmrg+ZLyIhktrZcggDljJcqSxi7q8/jrRkBSa/ tIMz5IvUmj1oUzfk5/luTOG+KEuJuMoG/bSRV+UeDpwJtQsg3iPJXCGRTdN9CE9M1evItfsmk/6aU HUSmCdupO12kRSO3VrLwt7q8QnUnMYhaEIWENcKwey4sbHVUVhoK7qCsRFV77SEugFBy0LBOWwtF8 USE2xfSxoIHqXHSNdgP+UYc3+AQ5pAJE6U/mqxKJZtOEH7yXimq2H2EKLwOhVv98jIrDT5OxSjhfE DB0bXidAhWx7fqZrHYe1XQ==; Received: from [87.69.77.57] (port=3805 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaz76-0003zG-T0; Wed, 21 Sep 2022 08:46:17 -0400 Date: Wed, 21 Sep 2022 15:46:13 +0300 Message-Id: <83edw4vqsq.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <8735clx8cl.fsf@localhost> (message from Ihor Radchenko on Wed, 21 Sep 2022 19:41:46 +0800) Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: 57972@debbugs.gnu.org > Date: Wed, 21 Sep 2022 19:41:46 +0800 > > Eli Zaretskii writes: > > > Would it be possible to have more info about the details? Like what > > are org-element-cache-reset and org-element-citation-prefix-re, and > > how do they enter the picture in the above scenario? > > Let's forget about org-element-citation-prefix-re for now. > > org-element-cache-reset is an autoloaded function defined inside > org-element.el > > Major mode body `org-mode' from org.el is calling > `org-element-cache-reset' as part of Org mode loading. > > org.el does not contain (require 'org-element). > Instead, it is assumed that `org-element-cache-reset' is autoloaded by > Emacs. org-element-cache-reset's autoload form is in org-loaddefs.el. The error message reported by the OP, viz.: File mode specification error: (void-function org-element-cache-reset) comes from normal-mode when it calls set-auto-mode. So something goes wrong there, perhaps because org-element-cache-reset is called before org.el loads org-loaddefs.el with this snippet: (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)))) I don't know what goes wrong, because I cannot reproduce the problem here, if I just visit a (non-existent) foo.org. After visiting the file, (fboundp 'org-element-cache-reset) yields t. So I have questions: . does this happen in "emacs -Q"? . does org-loaddefs.el exist on load-path, and is it being loaded by org.el? . could it be that user customizations somehow define file-local variables or directory-local variables or something else that attempts to use org-element-cache-reset too early? Alternatively, a complete recipe (without referring to directories that I definitely don't have here) to reproduce the problem could answer all those questions succinctly and efficiently. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 08:59:29 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 12:59:30 +0000 Received: from localhost ([127.0.0.1]:32901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazK5-0006vd-Ht for submit@debbugs.gnu.org; Wed, 21 Sep 2022 08:59:29 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:35523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazK2-0006vP-Ue for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 08:59:27 -0400 Received: by mail-lf1-f48.google.com with SMTP id z25so9111180lfr.2 for <57972@debbugs.gnu.org>; Wed, 21 Sep 2022 05:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=qCDKgC8dZam6ZwjarNi+YjhtajfDxRC47esJLwaKN2w=; b=mtPl84/U4qL4o34Z+VbpZUR8Boa1MFHnRWtxYw/rFE5SfDlgJpsKqhTO61nmu65E+j oF/rJmHpmWEZExV9dAPt34g2g8ryEhmgmFWqmWcX1+bE3PQ8sRxBlH8o27qaGSpKgU7b FZFqUjboS77VsaeciJ/ZrjNuwxEiqd9fViDsEnQf6ceHmSqgmp+/wL78oODTgU8h8WxT OYKDg0oUNxwnQTwwCu1k7DE/mXgtIDXNii0BDFrPhRZSeMKRiUwYP1Pnwkd7MEVj5j60 Soft1iZ269MVzV/pRJil2fI7QS035r138hwmeP9nC3JUS3BJwGxHJqFjf8wkq4EJ6/sG hFzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=qCDKgC8dZam6ZwjarNi+YjhtajfDxRC47esJLwaKN2w=; b=bdYTbHDeUdaM+yT8lAv25ODVkpcO49AznGW2M+o4e/CNsTDxEB1cb2fweoy8djIKGM LkjIbdFnbjKbp+0WRMpZYqgQGGdWg6MBZNEfaEZR1JwKI5IA0anosmbERS6uGQ/pN9b7 ykUic1PukcY8SjLkGD3r4M7jBZojLnWBzVnpRQAAplfihmRynwB9YWqh74oeN/jsnAa1 YbdlyC9xSXEswA7rTVmXhhDmBs17v+SBl2Gfzn2uB0FNg7AMD39Wx7xd8sDEqNYCnI/w eM6t4l8DhL9Rwehdiiw66pYWHEVaTQB+jOhOM/TA0BUUquKtjkXak9+Z9HR82f2GEhQX OIeg== X-Gm-Message-State: ACrzQf1lgqns6GeUwFgGKRDC6FxWpEdJTC1q8UBH2QkF3mwN9FfHAIaD DL/u1JWwdtdiGOgP7+AmPmcK53pWYWqxsCFCByXI98KnrVzY3g== X-Google-Smtp-Source: AMsMyM7twPjYQ8j6qhrKA5ORDiqFAOYUU/gFOTi2Icjhe9HYN8liZRjOQRUul8+F7TSJIhE/OJUDCDyjbaqxTaoXikQ= X-Received: by 2002:ac2:5bd2:0:b0:498:909:9c81 with SMTP id u18-20020ac25bd2000000b0049809099c81mr9484636lfn.120.1663765160829; Wed, 21 Sep 2022 05:59:20 -0700 (PDT) MIME-Version: 1.0 References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <83edw4vqsq.fsf@gnu.org> In-Reply-To: <83edw4vqsq.fsf@gnu.org> From: Ihor Radchenko Date: Wed, 21 Sep 2022 21:00:08 +0800 Message-ID: Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body To: Eli Zaretskii Content-Type: multipart/alternative; boundary="00000000000066a94e05e92f836b" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --00000000000066a94e05e92f836b Content-Type: text/plain; charset="UTF-8" > > Alternatively, a complete recipe (without referring to directories > that I definitely don't have here) to reproduce the problem could > answer all those questions succinctly and efficiently. > Here it is 1. cd /tmp 2. git clone git://git.sv.gnu.org/emacs/org-mode.git 3. cd org-mode 4. make autoloads 5. Create /tmp/bug.el with the following contents: ----- (add-to-list 'load-path "/tmp/org-mode/lisp") (require 'org) ----- 6. Create /tmp/bug.org with the following contents: ----- * TODO start clock on this test item ----- 7. emacs -Q /tmp/bug.el 8. M-x eval-buffer 9. C-x C-f /tmp/bug.org 10. Observe error in echo area Note that doing emacs -Q -l /tmp/bug.el in step 7 does _not_ trigger the error. Best, Ihor --00000000000066a94e05e92f836b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Alternatively, a complete recipe (without referring to directories
that I definitely don't have here) to reproduce the problem could
answer all those questions succinctly and efficiently.

Here it is
1. cd /tmp
2.=C2=A0git clone git://git.sv.gnu.org/emacs/org-mode.git
6. Create /tmp/bug.org with the following contents:
-----
* TOD= O start clock on this test item
-----
7. emacs -Q /= tmp/bug.el
8. M-x eval-buffer
9. C-x C-f /tmp/bug.org
10. Observe error in echo area

Note that doing emacs -Q -l /tmp/bug.el in step 7 do= es _not_ trigger the error.

Best,
Ihor
--00000000000066a94e05e92f836b-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 09:14:42 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 13:14:42 +0000 Received: from localhost ([127.0.0.1]:32949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazYn-0007Lx-NE for submit@debbugs.gnu.org; Wed, 21 Sep 2022 09:14:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazYi-0007Lg-4P for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 09:14:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oazYc-0002P5-Mu; Wed, 21 Sep 2022 09:14:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CWX/0D3lyhQOBID9p9qrRemEvK6oe6lXQVH0xXZ38s8=; b=Erk1yJ18ian2 ogFAdhbJPrLCuV8hzDuYCkFcfnYO9C4aWGltYNtRKKlX61qXjEjos+JUBUx5WpITf2r0c1Kkk6D2o StwH46y8qTnFOp+GqxNgSGvCgsXAGSkdkW8jBPizVhIdyFQgv2Lw9mWun5snvOxhvJuxtJUH/szl+ 1yT0WYMqqyEhuHoOUX0H7J3CYg/INwMu/ddmh+OvNwhhjkV8N9AwuIsyyvwirUE/M+2gOqSq6ovuA FdR5yv3Bgzcq6jw+F/w5JmnBwbKlh5+oHXSgpuxT9BL5m2rRafw1jkTIejbU+aDsN4SWSFrQkD8hR Of26c6KyXVIt4nmAOpwuVA==; Received: from [87.69.77.57] (port=1585 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oazYb-0004mS-Vv; Wed, 21 Sep 2022 09:14:30 -0400 Date: Wed, 21 Sep 2022 16:14:37 +0300 Message-Id: <838rmcvphe.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: (message from Ihor Radchenko on Wed, 21 Sep 2022 21:00:08 +0800) Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <83edw4vqsq.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Wed, 21 Sep 2022 21:00:08 +0800 > Cc: 57972@debbugs.gnu.org > > Alternatively, a complete recipe (without referring to directories > that I definitely don't have here) to reproduce the problem could > answer all those questions succinctly and efficiently. > > Here it is > 1. cd /tmp > 2. git clone git://git.sv.gnu.org/emacs/org-mode.git So reproducing this requires the development version of Org? > 3. cd org-mode > 4. make autoloads > 5. Create /tmp/bug.el with the following contents: > ----- > (add-to-list 'load-path "/tmp/org-mode/lisp") > (require 'org) > ----- > 6. Create /tmp/bug.org with the following contents: > ----- > * TODO start clock on this test item > ----- > 7. emacs -Q /tmp/bug.el > 8. M-x eval-buffer > 9. C-x C-f /tmp/bug.org > 10. Observe error in echo area I cannot reproduce with the version of Org we have on the Emacs master branch. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 09:18:46 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 13:18:46 +0000 Received: from localhost ([127.0.0.1]:32974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazck-0007Tr-6S for submit@debbugs.gnu.org; Wed, 21 Sep 2022 09:18:46 -0400 Received: from mail-lf1-f54.google.com ([209.85.167.54]:43850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oazci-0007Te-M0 for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 09:18:45 -0400 Received: by mail-lf1-f54.google.com with SMTP id o2so9139575lfc.10 for <57972@debbugs.gnu.org>; Wed, 21 Sep 2022 06:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=uQnpzT2LidvgVidix8AluQ8gZST1tsD4T92DxoJrqvw=; b=RSiyy46fwVE5ZJoZ8CJveaxtvuHTnTfn86228w76dpxyPvJstsVEXj+1YrlOHshSx8 z17sLol9AjokHtNViOPAJQ094rR9pPSuqTVFh9wotHEv04XuowO6w7f5pREosVJeu6XC tBZfGS0oC8Rg2Afip9Jrtiol4SwNaa2FptcTBW/eSDsxPrDoWg10WWOzcGB1fHSBq7+Q SKq2EoNUB0tXHKYrRmR2UibtNwt9A08D0XRrcHVvfBDS0tQJ/4OPkUKH+ye4kgg4u8sh Zm76HjllcMdbfJydV+TDfzG6wpyS5Xd9RhdUtv0/0Gl1N2FIWdlkhigjl+/A6jyTiojs uqSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=uQnpzT2LidvgVidix8AluQ8gZST1tsD4T92DxoJrqvw=; b=am/E6VKUGd0T6o3r3NSJzAggu7bH8ULdVn76G/C6ZKLgKtJPMa69F8i89vGTAx0YlU 3r62Afs8ks/tyfd4zdCxJ+sjIQnALoEpbRtX3pPoupSVLV8uw+MapH852N00VEeHpbZb sr0IGH7xMtYAYFP0cwCL09rW66V5EGzZ/7ubcsTlNdI2l+kaYlOCJhzyYjrjwOOjp7Wr B4MZEE0Kkc+KOdZA+lZSGjHyaPomnJuBH0oWaVfMA/s47FxsW2Ziw3ATCacjBTcf3AqS 16B6SLLp3pOzIwwbAKyVVMT2L7nhbv9kQt8CklTz0Mcwtfmp7xx1LTa+/APzkYXTHDYg k+Wg== X-Gm-Message-State: ACrzQf3a2xKCHKlhziq72qgQgkgUQQ4Ff1RG7pihpIkICjriy4scVJav RjKmkW82KMqYDC3cuR7kL5FsAf2SCb7nx3iJlowgs5oZ X-Google-Smtp-Source: AMsMyM7PJE9rY8ZU+rNmRmPkFADiXMLVyPytL9Z8Psnx8rVCmLIVQ4FOzvadbiqukC+G49mTwH7c0y5lpZGa1zxffgo= X-Received: by 2002:a05:6512:138d:b0:499:cf11:ca77 with SMTP id p13-20020a056512138d00b00499cf11ca77mr9766062lfa.140.1663766318421; Wed, 21 Sep 2022 06:18:38 -0700 (PDT) MIME-Version: 1.0 References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <83edw4vqsq.fsf@gnu.org> <838rmcvphe.fsf@gnu.org> In-Reply-To: <838rmcvphe.fsf@gnu.org> From: Ihor Radchenko Date: Wed, 21 Sep 2022 21:19:26 +0800 Message-ID: Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000661ae005e92fc884" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000661ae005e92fc884 Content-Type: text/plain; charset="UTF-8" > > So reproducing this requires the development version of Org? > Yes. > I cannot reproduce with the version of Org we have on the Emacs > master branch. > I cannot reproduce on stable branch either. Only on main. Best, Ihor --000000000000661ae005e92fc884 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
So reproducing this requires the development version of Org?

Yes.
=C2=A0
I cannot reproduce with the version of Org we have on the Emacs
master branch.
=C2=A0
I cannot reproduce on = stable branch either. Only on main.

Bes= t,
Ihor
--000000000000661ae005e92fc884-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 10:04:52 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 14:04:52 +0000 Received: from localhost ([127.0.0.1]:34892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0LM-0000kF-1z for submit@debbugs.gnu.org; Wed, 21 Sep 2022 10:04:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0LJ-0000k2-Ka for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 10:04:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0LE-0004S8-AN; Wed, 21 Sep 2022 10:04:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4/eC40tcCgz4OT1u6B5nQOSUGCcXtJIrclSOoMaoJVA=; b=JuQAJvxARUur 6hyN8SFymcpJmM+DHUAYGh6O9DqOi5OAJWWJ5Kxigd6ybEkbLfmBUSvgIW02a+i9seRrBaW+ncxYR Q/rqEYqVNn3LS4BhdxI45w4hydV1T6V3Id0NT7qOVFKx7sSVDWiXC5iNGlkArKfouM0d4qGOl4Lcw 2oiCVW14ih5Z2pMOF7Ju5yJuGCC0i1GcUImLtRjJ4Q8tWdaB5OP/a5RxUlnJvOvU71psEznbXeZkO VKImkeehEI8oxDDL9uznPvDN0jHVMNXBr8Y525JQMetqERwHjGBPvad7+Quq+E9tiFCfYYQ9Q79Pz D5wfSkLvbBxl0GGm549EhQ==; Received: from [87.69.77.57] (port=4671 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0LA-0005of-NB; Wed, 21 Sep 2022 10:04:42 -0400 Date: Wed, 21 Sep 2022 17:04:50 +0300 Message-Id: <8335ckvn5p.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: (message from Ihor Radchenko on Wed, 21 Sep 2022 21:19:26 +0800) Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <83edw4vqsq.fsf@gnu.org> <838rmcvphe.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Wed, 21 Sep 2022 21:19:26 +0800 > Cc: 57972@debbugs.gnu.org > > So reproducing this requires the development version of Org? > > Yes. > > I cannot reproduce with the version of Org we have on the Emacs > master branch. > > > I cannot reproduce on stable branch either. Only on main. Then why do you think this is a problem in the core? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 10:09:44 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 14:09:44 +0000 Received: from localhost ([127.0.0.1]:34912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0Q4-0000sc-5b for submit@debbugs.gnu.org; Wed, 21 Sep 2022 10:09:44 -0400 Received: from mail-lf1-f45.google.com ([209.85.167.45]:37863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0Q2-0000sP-Hi for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 10:09:42 -0400 Received: by mail-lf1-f45.google.com with SMTP id k10so9426331lfm.4 for <57972@debbugs.gnu.org>; Wed, 21 Sep 2022 07:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=kRfMjElqdpuFKs2Ev7N+QgFk73krMUEQ78DTBAtPHKw=; b=HqmgbWRF0aAfHrR8Z4cH0QnAs1FXacQeVKR0o68T5i6w/9EUC2Dp3CTilflYEe406v QA90wY+uVEqw8vT9e0JxeAay7FYyaUs2ijoUtzC1LbQGiYUUgW0XOKNAr7EbWfOkxLTb 65bxHjnbV9vEsox13tZba2D0Q/KL2zg9MfzEP2DzlgHCLpaBsoTpCvPRqq/t2BnoWFRu Ey6NkbCUTMIZ8EzcBKA6ebyiBHyL8qs/dl/tFza58czsAWCUt9sMm+CRkwOUxuymfKC+ klFwEaYiQvyMZSdf0nAPB4XosfFzytq7hbBhi43xiQXmn8gzFb/y47q27hVYYMeYeH38 GpVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=kRfMjElqdpuFKs2Ev7N+QgFk73krMUEQ78DTBAtPHKw=; b=dkt567UUYYeoVH7vIMqHMLRHojrQ3F/xEhfNteotrfZJ78eYlIgAaT7tixUTGO+ZCE gowp39ZSBHTUPzXwTXQwgMcSpmgesQg0hNg5+QdgCimiQNKOFg8ENf5b/m5pbULCbjUI mdlbmIWIVEu5emX88eWDhVjVThp4/A0vZI0zu2bsoKKySd8BG+IdGooCSSdg8OUFEMcY jmHYaecWpdOKmosA7IUVd9NOKC33SKqfCnHZTT0SlfpC8XEziIe2Fm/m+mYosmjgcL75 BNzvIoon+lPryFJMrWgLFzkCwKxZumKN4Pi49owliTcX0sK88Snk88UH322TzCVl5vjN TVXw== X-Gm-Message-State: ACrzQf2HuTbTFa4/A24/bruvAS4nGWL+sEir49gTCLevGq82DTT33CfW 3mYh2FaJKlqJgnpCypJWIAQf7baLAKNUW/3coJgP/oOFTLw= X-Google-Smtp-Source: AMsMyM7ZjygcVl8XAMQ/KjIe7JiU0k4TMtzE+lVfnsXKLHmKmhdLW1eIRsSYzUfxtGv1GKDyoY7AiHdCSihE7JJJh40= X-Received: by 2002:ac2:544a:0:b0:49f:4ecb:178d with SMTP id d10-20020ac2544a000000b0049f4ecb178dmr9739372lfn.663.1663769376513; Wed, 21 Sep 2022 07:09:36 -0700 (PDT) MIME-Version: 1.0 References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <83edw4vqsq.fsf@gnu.org> <838rmcvphe.fsf@gnu.org> <8335ckvn5p.fsf@gnu.org> In-Reply-To: <8335ckvn5p.fsf@gnu.org> From: Ihor Radchenko Date: Wed, 21 Sep 2022 22:10:24 +0800 Message-ID: Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000ace4fa05e9307e90" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000ace4fa05e9307e90 Content-Type: text/plain; charset="UTF-8" > > I cannot reproduce on stable branch either. Only on main. > > Then why do you think this is a problem in the core? > As I said in my first message, I either misunderstand something about autoload or it is some kind of Emacs bug. Note that doing emacs -Q -l /tmp/bug.el vs emacs -Q /tmp/bug.el + eval-buffer yields different results. I cannot possibly see how it can be anything to do with Org and I have no clue how to approach debugging this. Best, Ihor --000000000000ace4fa05e9307e90 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> I cannot reproduce on stable branch either. Only on main.

Then why do you think this is a problem in the core?
<= br>
As I said in my first message, I either misunderstand somethi= ng about autoload or it is some kind of
Emacs bug.=C2=A0

Note that doing emacs -Q -l /tmp/bug.el vs emacs -Q /tmp/b= ug.el=C2=A0+ eval-buffer yields different results.
I cannot possi= bly see how it can be anything to do with Org and I have no clue how to app= roach debugging this.

Best,
Ihor
--000000000000ace4fa05e9307e90-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 10:27:13 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 14:27:13 +0000 Received: from localhost ([127.0.0.1]:34996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0gz-0003aq-Bo for submit@debbugs.gnu.org; Wed, 21 Sep 2022 10:27:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob0gx-0003ad-Al for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 10:27:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0gs-0000jX-1w; Wed, 21 Sep 2022 10:27:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=hGKszYUTU9W//exrr+VlFXYwBPp2Un9TXURWS2ArNRo=; b=OXuYu+Of6gQi qLNbAzeE2+X0lDhpdfwsAb3xG/W/V1xJH4wiBEdqa35qISh7pAoKyHGhrlngfipUGErgpt7QRG3lh srihSner5h4a6ghsxuDnwDG2JO3EPcUuOEAj8RmebCpN8Ha6yYiSwg/KGLBHDUz0Q5J6co8vuXym1 9FuuJHgNdDdeO3/KbCh8xy2FHRnU/hjEbO112p79qVslhisbB2vGlYYxUfQsmTFvNBUSMTUuX5w4b 4H4wPAUTA5OqQBkKZfZSMIPQxeMi4fkX5LPC3wXz41351bjeRpAnIsCnLoK9+KglgBAeC9bv4lE4X RoQXeuzTngiilVxJr3DQVg==; Received: from [87.69.77.57] (port=2068 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0gq-0000fQ-2L; Wed, 21 Sep 2022 10:27:05 -0400 Date: Wed, 21 Sep 2022 17:27:12 +0300 Message-Id: <83zgesu7jz.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: (message from Ihor Radchenko on Wed, 21 Sep 2022 22:10:24 +0800) Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body References: <87fsglxh24.fsf@localhost> <83k05xufhf.fsf@gnu.org> <8735clx8cl.fsf@localhost> <83edw4vqsq.fsf@gnu.org> <838rmcvphe.fsf@gnu.org> <8335ckvn5p.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Wed, 21 Sep 2022 22:10:24 +0800 > Cc: 57972@debbugs.gnu.org > > > I cannot reproduce on stable branch either. Only on main. > > Then why do you think this is a problem in the core? > > As I said in my first message, I either misunderstand something about autoload or it is some kind of > Emacs bug. > > Note that doing emacs -Q -l /tmp/bug.el vs emacs -Q /tmp/bug.el + eval-buffer yields different results. > I cannot possibly see how it can be anything to do with Org and I have no clue how to approach debugging > this. Fair enough. Would it help to make the backtrace more detailed? Right now, we don't see anything between the call to normal-mode and the error. If you manually "M-x load-file RET files.el RET" before doing eval-buffer, do you get a more detailed backtrace? And another thing: do you have any clue (or maybe more than a clue) what changes in Org wrt what's on the Emacs master branch could have caused this? If you do, can you show those changes, or point to the specific places in Org files where those changes can be eye-balled? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 10:50:46 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 14:50:46 +0000 Received: from localhost ([127.0.0.1]:35018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob13i-0004CT-F5 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 10:50:46 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:47074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob13c-0004C7-7G for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 10:50:39 -0400 Received: by mail-lf1-f51.google.com with SMTP id a8so9567594lff.13 for <57972@debbugs.gnu.org>; Wed, 21 Sep 2022 07:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=ixLdBm6eoTg6tbkUqsZJk/dreA4BwxmThhUZO8ees38=; b=lvaMLyC7vPLtI7D+rjrL1Re2y0Q18ENq/cXZSexLfNiVzWRBkyAiokZob8io2WkJKU CASbKLRok3a9yo5nsVmi7xAbESFLSLwWQoUYv7tzrpmjbPQCePQRbNreWdsdniyUSQol pYo5Pfju7hUu0Us6fOYpwyeWy+32PVXYl4hhGWRwWllfEuTM0ImU99YPSo5Yd06TC6cV HQKNatmvIogZXPArPZJiVS9scNm/zwrZaKWsQP85PCvF7rA/eb3ixtBBtkBUSLNx0x+s 6NI2mTRkGpLuJ3TR+7FAb+Z5VaVy/Ul8pm3GP0l80x4WoJBlsfnY04d1xNgQp/p8wILC KGcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=ixLdBm6eoTg6tbkUqsZJk/dreA4BwxmThhUZO8ees38=; b=bsmnP2MFVBa37u1uhFZJ7p8P+bRMOui2/4GZb3G5r0t4V/FEnfkp5jAY9XdFlWJywX AIrBlswEkUYFJ3taeHSTqnkslU/Wy+s33Re33QzWXJ2GZYvXlue706tLSApYXQTnR0KP clkSZvMelwcHDtevl2dHu7CnK+3DX2Mj0xlcND2QKpgsC1T3HsEksAx6bqN+XnVXPzT7 acRNae1z+VsN66N9muHJcJXOrgGOFrlqN45XLAB5Lb4uWYb/TRscJNrxsXSKi9UauoCJ 6gtGBccEirOK0KUu3PDuQGA32OiNxlBNcpYsZwVx0HubPw8NRkyleGlCHZuzN/Uo1LPn Y02w== X-Gm-Message-State: ACrzQf0OhagY7NEztG9ozu2o0hl8tc5KcPvbLxwZ70tnmhvVgUOQLaj/ GJpiBb8TodTXUBR1sMbySP4rQEMyeg3320nu7ughcTLKk4NRyA== X-Google-Smtp-Source: AMsMyM7EuptWdAzw+NZivYAHNc4cC+Jr/S5wSaKO2rWC9gxqRMfoO25eHpa31ePwK+3rhE/+rdVwfBjCmeaXrAADaQo= X-Received: by 2002:ac2:544a:0:b0:49f:4ecb:178d with SMTP id d10-20020ac2544a000000b0049f4ecb178dmr9807535lfn.663.1663771829334; Wed, 21 Sep 2022 07:50:29 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <83zgesu7jz.fsf@gnu.org> From: Ihor Radchenko Date: Wed, 21 Sep 2022 22:51:16 +0800 Message-ID: Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000dff76b05e9311080" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000dff76b05e9311080 Content-Type: text/plain; charset="UTF-8" > > And another thing: do you have any clue (or maybe more than a clue) > what changes in Org wrt what's on the Emacs master branch could have > caused this? If you do, can you show those changes, or point to the > specific places in Org files where those changes can be eye-balled? I bisected Org repo and found the first bad commit. Unfortunately, it is not very useful. The commit changed the order function calls in org-mode. Before the commit, `org-setup-filling' got called prior to `org-element-cache-reset' and `org-setup-filling' has an explicit (require 'org-element) statement, which made autoloading unnecessary in the past. Would it help to make the backtrace more detailed? Right now, we > don't see anything between the call to normal-mode and the error. If > you manually "M-x load-file RET files.el RET" before doing > eval-buffer, do you get a more detailed backtrace? > > Doing load-file made no difference. I can generate an alternative backtrace using debug-on-entry org-mode. The debug buffer right before error is below Debugger entered--beginning evaluation of function call form: * (org-element-cache-reset) * (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode 'org-mode) (setq mode-name "Org") (progn (if (get 'outline-mode 'mode-class) (put 'org-mode 'mode-class (get 'outline-mode 'mode-class))) (if (keymap-parent org-mode-map) nil (set-keymap-parent org-mode-map (current-local-map))) (let ((parent (char-table-parent org-mode-syntax-table))) (if (and parent (not (eq parent (standard-syntax-table)))) nil (set-char-table-parent org-mode-syntax-table (syntax-table)))) (if (or (abbrev-table-get org-mode-abbrev-table :parents) (eq org-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put org-mode-abbrev-table :parents (list local-abbrev-table)))) (use-local-map org-mode-map) (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table org-mode-abbrev-table) (set (make-local-variable 'org-mode-loading) t) (org-load-modules-maybe) (if org-agenda-file-menu-enabled (progn (org-install-agenda-files-menu))) (if (and org-link-descriptive (eq org-fold-core-style 'overlays)) (progn (add-to-invisibility-spec '(org-link)))) (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal "" org-ellipsis)) org-ellipsis) "...")) (make-local-variable 'org-link-descriptive) (if (eq org-fold-core-style 'overlays) (progn (add-to-invisibility-spec '(org-hide-block . t)))) (if org-link-descriptive (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil) (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)) (set (make-local-variable 'outline-regexp) org-outline-regexp) (set (make-local-variable 'outline-level) 'org-outline-level) (if (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) (progn (if org-display-table nil (setq org-display-table (make-display-table))) (set-display-table-slot org-display-table 4 (vconcat (mapcar #'(lambda ... ...) org-ellipsis))) (setq buffer-display-table org-display-table))) (org-set-regexps-and-options) (org-set-font-lock-defaults) (if (and org-tag-faces (not org-tags-special-faces-re)) (progn (org-set-tag-faces 'org-tag-faces org-tag-faces))) (set (make-local-variable 'calc-embedded-open-mode) "# ") (modify-syntax-entry 34 "\"") (modify-syntax-entry 92 "_") (modify-syntax-entry 126 "_") (modify-syntax-entry 60 "(>") (modify-syntax-entry 62 ")<") (set (make-local-variable 'font-lock-unfontify-region-function) 'org-unfontify-region) (set (make-local-variable 'org-table-may-need-update) t) (add-hook 'before-change-functions 'org-before-change-function nil 'local) (add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local) (org-element-cache-reset) (if (and org-element-cache-persistent org-element-use-cache) (progn (org-persist-load 'org-element--cache (current-buffer) t))) (org-macro-initialize-templates) (org-update-radio-target-regexp) (set (make-local-variable 'indent-line-function) 'org-indent-line) (set (make-local-variable 'indent-region-function) 'org-indent-region) (org-setup-filling) (org-setup-comments-handling) (set (make-local-variable 'beginning-of-defun-function) 'org-backward-element) (set (make-local-variable 'end-of-defun-function) #'(lambda nil (if (not (org-at-heading-p)) (org-forward-element) (org-forward-element) (forward-char -1)))) (set (make-local-variable 'next-error-function) 'org-occur-next-match) (set (make-local-variable 'add-log-current-defun-function) #'org-add-log-current-headline) (if org-enforce-todo-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent) (remove-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent)) (if org-enforce-todo-checkbox-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-checkboxes) (remove-hook 'org-blocker-hook 'org-block-todo-from-checkboxes)) (set (make-local-variable 'align-mode-rules-list) '((org-in-buffer-settings (regexp . "^[ \11]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes quote (org-mode))))) (set (make-local-variable 'pcomplete-command-completion-function) #'org-pcomplete-initial) (set (make-local-variable 'pcomplete-command-name-function) #'org-command-at-point) ...) * (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode 'org-mode) (setq mode-name "Org") (progn (if (get 'outline-mode 'mode-class) (put 'org-mode 'mode-class (get 'outline-mode 'mode-class))) (if (keymap-parent org-mode-map) nil (set-keymap-parent org-mode-map (current-local-map))) (let ((parent (char-table-parent org-mode-syntax-table))) (if (and parent (not (eq parent ...))) nil (set-char-table-parent org-mode-syntax-table (syntax-table)))) (if (or (abbrev-table-get org-mode-abbrev-table :parents) (eq org-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put org-mode-abbrev-table :parents (list local-abbrev-table)))) (use-local-map org-mode-map) (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table org-mode-abbrev-table) (set (make-local-variable 'org-mode-loading) t) (org-load-modules-maybe) (if org-agenda-file-menu-enabled (progn (org-install-agenda-files-menu))) (if (and org-link-descriptive (eq org-fold-core-style 'overlays)) (progn (add-to-invisibility-spec '(org-link)))) (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal "" org-ellipsis)) org-ellipsis) "...")) (make-local-variable 'org-link-descriptive) (if (eq org-fold-core-style 'overlays) (progn (add-to-invisibility-spec '(org-hide-block . t)))) (if org-link-descriptive (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil) (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)) (set (make-local-variable 'outline-regexp) org-outline-regexp) (set (make-local-variable 'outline-level) 'org-outline-level) (if (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) (progn (if org-display-table nil (setq org-display-table (make-display-table))) (set-display-table-slot org-display-table 4 (vconcat (mapcar #'... org-ellipsis))) (setq buffer-display-table org-display-table))) (org-set-regexps-and-options) (org-set-font-lock-defaults) (if (and org-tag-faces (not org-tags-special-faces-re)) (progn (org-set-tag-faces 'org-tag-faces org-tag-faces))) (set (make-local-variable 'calc-embedded-open-mode) "# ") (modify-syntax-entry 34 "\"") (modify-syntax-entry 92 "_") (modify-syntax-entry 126 "_") (modify-syntax-entry 60 "(>") (modify-syntax-entry 62 ")<") (set (make-local-variable 'font-lock-unfontify-region-function) 'org-unfontify-region) (set (make-local-variable 'org-table-may-need-update) t) (add-hook 'before-change-functions 'org-before-change-function nil 'local) (add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local) (org-element-cache-reset) (if (and org-element-cache-persistent org-element-use-cache) (progn (org-persist-load 'org-element--cache (current-buffer) t))) (org-macro-initialize-templates) (org-update-radio-target-regexp) (set (make-local-variable 'indent-line-function) 'org-indent-line) (set (make-local-variable 'indent-region-function) 'org-indent-region) (org-setup-filling) (org-setup-comments-handling) (set (make-local-variable 'beginning-of-defun-function) 'org-backward-element) (set (make-local-variable 'end-of-defun-function) #'(lambda nil (if (not (org-at-heading-p)) (org-forward-element) (org-forward-element) (forward-char -1)))) (set (make-local-variable 'next-error-function) 'org-occur-next-match) (set (make-local-variable 'add-log-current-defun-function) #'org-add-log-current-headline) (if org-enforce-todo-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent) (remove-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent)) (if org-enforce-todo-checkbox-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-checkboxes) (remove-hook 'org-blocker-hook 'org-block-todo-from-checkboxes)) (set (make-local-variable 'align-mode-rules-list) '((org-in-buffer-settings (regexp . "^[ \11]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes quote (org-mode))))) (set (make-local-variable 'pcomplete-command-completion-function) #'org-pcomplete-initial) (set (make-local-variable 'pcomplete-command-name-function) #'org-command-at-point) ...)) * (closure (org-mode-abbrev-table org-mode-syntax-table org-element-use-cache org-element-cache-persistent buffer-face-mode-face org-tbl-menu org-org-menu org-struct-menu org-entities org-last-state org-id-track-globally org-clock-start-time texmathp-why remember-data-file org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules-list org-emphasis-alist org-emphasis-regexp-components org-export-registered-backends org-modules crm-separator org-babel-load-languages org-id-overriding-file-name org-indent-indentation-per-level org-element--timestamp-regexp org-element-cache-map-continue-from org-element-paragraph-separate org-agenda-buffer-name org-inlinetask-min-level t) nil "Outline-based notes management and organizer, alia..." (interactive) (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode 'org-mode) (setq mode-name "Org") (progn (if (get 'outline-mode 'mode-class) (put 'org-mode 'mode-class (get 'outline-mode 'mode-class))) (if (keymap-parent org-mode-map) nil (set-keymap-parent org-mode-map (current-local-map))) (let ((parent (char-table-parent org-mode-syntax-table))) (if (and parent (not ...)) nil (set-char-table-parent org-mode-syntax-table (syntax-table)))) (if (or (abbrev-table-get org-mode-abbrev-table :parents) (eq org-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put org-mode-abbrev-table :parents (list local-abbrev-table)))) (use-local-map org-mode-map) (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table org-mode-abbrev-table) (set (make-local-variable 'org-mode-loading) t) (org-load-modules-maybe) (if org-agenda-file-menu-enabled (progn (org-install-agenda-files-menu))) (if (and org-link-descriptive (eq org-fold-core-style 'overlays)) (progn (add-to-invisibility-spec '(org-link)))) (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal "" org-ellipsis)) org-ellipsis) "...")) (make-local-variable 'org-link-descriptive) (if (eq org-fold-core-style 'overlays) (progn (add-to-invisibility-spec '(org-hide-block . t)))) (if org-link-descriptive (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil) (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)) (set (make-local-variable 'outline-regexp) org-outline-regexp) (set (make-local-variable 'outline-level) 'org-outline-level) (if (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) (progn (if org-display-table nil (setq org-display-table (make-display-table))) (set-display-table-slot org-display-table 4 (vconcat (mapcar ... org-ellipsis))) (setq buffer-display-table org-display-table))) (org-set-regexps-and-options) (org-set-font-lock-defaults) (if (and org-tag-faces (not org-tags-special-faces-re)) (progn (org-set-tag-faces 'org-tag-faces org-tag-faces))) (set (make-local-variable 'calc-embedded-open-mode) "# ") (modify-syntax-entry 34 "\"") (modify-syntax-entry 92 "_") (modify-syntax-entry 126 "_") (modify-syntax-entry 60 "(>") (modify-syntax-entry 62 ")<") (set (make-local-variable 'font-lock-unfontify-region-function) 'org-unfontify-region) (set (make-local-variable 'org-table-may-need-update) t) (add-hook 'before-change-functions 'org-before-change-function nil 'local) (add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local) (org-element-cache-reset) (if (and org-element-cache-persistent org-element-use-cache) (progn (org-persist-load 'org-element--cache (current-buffer) t))) (org-macro-initialize-templates) (org-update-radio-target-regexp) (set (make-local-variable 'indent-line-function) 'org-indent-line) (set (make-local-variable 'indent-region-function) 'org-indent-region) (org-setup-filling) (org-setup-comments-handling) (set (make-local-variable 'beginning-of-defun-function) 'org-backward-element) (set (make-local-variable 'end-of-defun-function) #'(lambda nil (if (not ...) (org-forward-element) (org-forward-element) (forward-char -1)))) (set (make-local-variable 'next-error-function) 'org-occur-next-match) (set (make-local-variable 'add-log-current-defun-function) #'org-add-log-current-headline) (if org-enforce-todo-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent) (remove-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent)) (if org-enforce-todo-checkbox-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-checkboxes) (remove-hook 'org-blocker-hook 'org-block-todo-from-checkboxes)) (set (make-local-variable 'align-mode-rules-list) '((org-in-buffer-settings (regexp . "^[ \11]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes quote ...)))) (set (make-local-variable 'pcomplete-command-completion-function) #'org-pcomplete-initial) (set (make-local-variable 'pcomplete-command-name-function) #'org-command-at-point) ...)) (run-mode-hooks 'org-mode-hook))() * apply((closure (org-mode-abbrev-table org-mode-syntax-table org-element-use-cache org-element-cache-persistent buffer-face-mode-face org-tbl-menu org-org-menu org-struct-menu org-entities org-last-state org-id-track-globally org-clock-start-time texmathp-why remember-data-file org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules-list org-emphasis-alist org-emphasis-regexp-components org-export-registered-backends org-modules crm-separator org-babel-load-languages org-id-overriding-file-name org-indent-indentation-per-level org-element--timestamp-regexp org-element-cache-map-continue-from org-element-paragraph-separate org-agenda-buffer-name org-inlinetask-min-level t) nil "Outline-based notes management and organizer, alia..." (interactive) (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode 'org-mode) (setq mode-name "Org") (progn (if (get 'outline-mode 'mode-class) (put 'org-mode 'mode-class (get ... ...))) (if (keymap-parent org-mode-map) nil (set-keymap-parent org-mode-map (current-local-map))) (let ((parent ...)) (if (and parent ...) nil (set-char-table-parent org-mode-syntax-table ...))) (if (or (abbrev-table-get org-mode-abbrev-table :parents) (eq org-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put org-mode-abbrev-table :parents (list local-abbrev-table)))) (use-local-map org-mode-map) (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table org-mode-abbrev-table) (set (make-local-variable 'org-mode-loading) t) (org-load-modules-maybe) (if org-agenda-file-menu-enabled (progn (org-install-agenda-files-menu))) (if (and org-link-descriptive (eq org-fold-core-style 'overlays)) (progn (add-to-invisibility-spec '...))) (org-fold-initialize (or (and (stringp org-ellipsis) (not ...) org-ellipsis) "...")) (make-local-variable 'org-link-descriptive) (if (eq org-fold-core-style 'overlays) (progn (add-to-invisibility-spec '...))) (if org-link-descriptive (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil) (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)) (set (make-local-variable 'outline-regexp) org-outline-regexp) (set (make-local-variable 'outline-level) 'org-outline-level) (if (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) (progn (if org-display-table nil (setq org-display-table ...)) (set-display-table-slot org-display-table 4 (vconcat ...)) (setq buffer-display-table org-display-table))) (org-set-regexps-and-options) (org-set-font-lock-defaults) (if (and org-tag-faces (not org-tags-special-faces-re)) (progn (org-set-tag-faces 'org-tag-faces org-tag-faces))) (set (make-local-variable 'calc-embedded-open-mode) "# ") (modify-syntax-entry 34 "\"") (modify-syntax-entry 92 "_") (modify-syntax-entry 126 "_") (modify-syntax-entry 60 "(>") (modify-syntax-entry 62 ")<") (set (make-local-variable 'font-lock-unfontify-region-function) 'org-unfontify-region) (set (make-local-variable 'org-table-may-need-update) t) (add-hook 'before-change-functions 'org-before-change-function nil 'local) (add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local) (org-element-cache-reset) (if (and org-element-cache-persistent org-element-use-cache) (progn (org-persist-load 'org-element--cache (current-buffer) t))) (org-macro-initialize-templates) (org-update-radio-target-regexp) (set (make-local-variable 'indent-line-function) 'org-indent-line) (set (make-local-variable 'indent-region-function) 'org-indent-region) (org-setup-filling) (org-setup-comments-handling) (set (make-local-variable 'beginning-of-defun-function) 'org-backward-element) (set (make-local-variable 'end-of-defun-function) #'(lambda nil (if ... ... ... ...))) (set (make-local-variable 'next-error-function) 'org-occur-next-match) (set (make-local-variable 'add-log-current-defun-function) #'org-add-log-current-headline) (if org-enforce-todo-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent) (remove-hook 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-parent)) (if org-enforce-todo-checkbox-dependencies (add-hook 'org-blocker-hook 'org-block-todo-from-checkboxes) (remove-hook 'org-blocker-hook 'org-block-todo-from-checkboxes)) (set (make-local-variable 'align-mode-rules-list) '((org-in-buffer-settings ... ...))) (set (make-local-variable 'pcomplete-command-completion-function) #'org-pcomplete-initial) (set (make-local-variable 'pcomplete-command-name-function) #'org-command-at-point) ...)) (run-mode-hooks 'org-mode-hook)) nil) * org-mode() funcall(org-mode) (progn (funcall mode) mode) (if mode (progn (funcall mode) mode)) (if (and keep-mode-if-same (eq (indirect-function mode) (indirect-function major-mode))) nil (if mode (progn (funcall mode) mode))) set-auto-mode-0(org-mode nil) (progn (set-auto-mode-0 mode keep-mode-if-same) t) (if mode (progn (set-auto-mode-0 mode keep-mode-if-same) t)) (let (mode (name buffer-file-name) (remote-id (file-remote-p buffer-file-name)) (case-insensitive-p (file-name-case-insensitive-p buffer-file-name))) (setq name (file-name-sans-versions name)) (if (and (stringp remote-id) (string-match (regexp-quote remote-id) name)) (progn (setq name (substring name (match-end 0))))) (while name (setq mode (if case-insensitive-p (let ((case-fold-search t)) (assoc-default name alist 'string-match)) (or (let ((case-fold-search nil)) (assoc-default name alist 'string-match)) (and auto-mode-case-fold (let (...) (assoc-default name alist ...)))))) (if (and mode (not (functionp mode)) (consp mode) (car (cdr mode))) (progn (setq mode (car mode)) (setq name (substring name 0 (match-beginning 0)))) (setq name nil))) (if (and dir-local mode (not (set-auto-mode--dir-local-valid-p mode))) (progn (message "Ignoring invalid mode `%s'" mode) (setq mode nil))) (if mode (progn (set-auto-mode-0 mode keep-mode-if-same) t))) (if buffer-file-name (let (mode (name buffer-file-name) (remote-id (file-remote-p buffer-file-name)) (case-insensitive-p (file-name-case-insensitive-p buffer-file-name))) (setq name (file-name-sans-versions name)) (if (and (stringp remote-id) (string-match (regexp-quote remote-id) name)) (progn (setq name (substring name (match-end 0))))) (while name (setq mode (if case-insensitive-p (let ((case-fold-search t)) (assoc-default name alist 'string-match)) (or (let (...) (assoc-default name alist ...)) (and auto-mode-case-fold (let ... ...))))) (if (and mode (not (functionp mode)) (consp mode) (car (cdr mode))) (progn (setq mode (car mode)) (setq name (substring name 0 (match-beginning 0)))) (setq name nil))) (if (and dir-local mode (not (set-auto-mode--dir-local-valid-p mode))) (progn (message "Ignoring invalid mode `%s'" mode) (setq mode nil))) (if mode (progn (set-auto-mode-0 mode keep-mode-if-same) t)))) set-auto-mode--apply-alist((("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.\\(?:3fr\\|a\\(?:rw\\|vs\\)\\|bmp[23]?\\|c\\(?:als?\\|myk..." . image-mode) ("\\.zst\\'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil jka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ("\\(?:\\.\\(?:rbw?\\|ru\\|rake\\|thor\\|jbuilder\\|rabl\\|ge..." . ruby-mode) ("\\.re?st\\'" . rst-mode) ("\\.py[iw]?\\'" . python-mode) ("\\.m\\'" . octave-maybe-mode) ("\\.less\\'" . less-css-mode) ("\\.scss\\'" . scss-mode) ("\\.awk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode) ("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ("\\.m\\'" . objc-mode) ("\\.ii\\'" . c++-mode) ("\\.i\\'" . c-mode) ("\\.lex\\'" . c-mode) ("\\.y\\(acc\\)?\\'" . c-mode) ("\\.h\\'" . c-or-c++-mode) ("\\.c\\'" . c-mode) ("\\.\\(CC?\\|HH?\\)\\'" . c++-mode) ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) ("\\.\\(cc\\|hh\\)\\'" . c++-mode) ("\\.\\(bat\\|cmd\\)\\'" . bat-mode) ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . mhtml-mode) ("\\.svgz?\\'" . image-mode) ("\\.svgz?\\'" . xml-mode) ("\\.x[bp]m\\'" . image-mode) ("\\.x[bp]m\\'" . c-mode) ("\\.p[bpgn]m\\'" . image-mode) ("\\.tiff?\\'" . image-mode) ("\\.gif\\'" . image-mode) ("\\.png\\'" . image-mode) ("\\.jpe?g\\'" . image-mode) ("\\.webp\\'" . image-mode) ("\\.te?xt\\'" . text-mode) ("\\.[tT]e[xX]\\'" . tex-mode) ("\\.ins\\'" . tex-mode) ("\\.ltx\\'" . latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) ...) nil nil) (setq done (set-auto-mode--apply-alist auto-mode-alist keep-mode-if-same nil)) (if done nil (setq done (set-auto-mode--apply-alist auto-mode-alist keep-mode-if-same nil))) (let ((try-locals (not (inhibit-local-variables-p))) end done mode modes) (save-excursion (goto-char (point-min)) (skip-chars-forward " \11\n") (and enable-local-variables try-locals (setq end (set-auto-mode-1)) (if (save-excursion (search-forward ":" end t)) (while (let ((case-fold-search t)) (or (and ... ...) (re-search-forward "[ \11;]mode:" end t))) (skip-chars-forward " \11") (let ((beg ...)) (if (search-forward ";" end t) (forward-char -1) (goto-char end)) (skip-chars-backward " \11") (setq modes (cons ... modes)))) (setq modes (cons (intern (concat ... "-mode")) modes))))) (if modes (catch 'nop (let ((--dolist-tail-- (nreverse modes))) (while --dolist-tail-- (let ((mode ...)) (if (not ...) (message "Ignoring unknown mode `%s'" mode) (setq done t) (or ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))))) (if done nil (condition-case err (let* ((mode-alist (cdr (hack-dir-local--get-variables ...)))) (setq done (set-auto-mode--apply-alist mode-alist keep-mode-if-same t))) ((debug error) (message "Directory-local variables error: %s" err) nil))) (and (not done) (setq mode (hack-local-variables t (not try-locals))) (not (memq mode modes)) (if (not (functionp mode)) (message "Ignoring unknown mode `%s'" mode) (setq done t) (set-auto-mode-0 mode keep-mode-if-same))) (and (not done) (setq mode (save-excursion (goto-char (point-min)) (if (looking-at auto-mode-interpreter-regexp) (match-string 2)))) (setq done (assoc-default (file-name-nondirectory mode) (mapcar #'(lambda (e) (cons ... ...)) interpreter-mode-alist) #'string-match-p)) (set-auto-mode-0 done keep-mode-if-same)) (if done nil (if (setq done (save-excursion (goto-char (point-min)) (save-restriction (narrow-to-region (point-min) (min ... ...)) (assoc-default nil magic-mode-alist #'...)))) (set-auto-mode-0 done keep-mode-if-same))) (if done nil (setq done (set-auto-mode--apply-alist auto-mode-alist keep-mode-if-same nil))) (if done nil (if (setq done (save-excursion (goto-char (point-min)) (save-restriction (narrow-to-region (point-min) (min ... ...)) (assoc-default nil magic-fallback-mode-alist #'...)))) (set-auto-mode-0 done keep-mode-if-same))) (if done nil (set-buffer-major-mode (current-buffer)))) set-auto-mode() (condition-case err (set-auto-mode) ((debug error) (message "File mode specification error: %s" err) nil)) (let ((enable-local-variables (or (not find-file) enable-local-variables))) (condition-case err (set-auto-mode) ((debug error) (message "File mode specification error: %s" err) nil)) (if delay-mode-hooks (progn (condition-case err (hack-local-variables 'no-mode) ((debug error) (message "File local-variables error: %s" err) nil))))) normal-mode(t) (if nomodes nil (if (and view-read-only view-mode) (progn (view-mode -1))) (normal-mode t) (and (memq require-final-newline '(visit visit-save)) (> (point-max) (point-min)) (/= (char-after (1- (point-max))) 10) (not (and (eq selective-display t) (= (char-after (1- (point-max))) 13))) (not buffer-read-only) (save-excursion (goto-char (point-max)) (condition-case nil (progn (insert "\n")) (error nil)))) (if (and buffer-read-only view-read-only (not (eq (get major-mode 'mode-class) 'special))) (progn (view-mode-enter))) (run-hooks 'find-file-hook)) after-find-file(nil t) (if rawfile (let ((enable-local-variables nil)) (set-buffer-multibyte nil) (setq buffer-file-coding-system 'no-conversion) (set-buffer-major-mode buf) (set (make-local-variable 'find-file-literally) t)) (after-find-file error (not nowarn))) (save-current-buffer (set-buffer buf) (kill-local-variable 'find-file-literally) (kill-local-variable 'buffer-file-coding-system) (kill-local-variable 'cursor-type) (let ((inhibit-read-only t)) (erase-buffer)) (and (not rawfile) (set-buffer-multibyte t)) (if rawfile (condition-case nil (let ((inhibit-read-only t) (enable-local-variables nil)) (insert-file-contents-literally filename t)) (file-error (if (and (file-exists-p filename) (not (file-readable-p filename))) (progn (kill-buffer buf) (signal 'file-error (list "File is not readable" filename)))) (setq error t))) (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-error (if (and (file-exists-p filename) (not (file-readable-p filename))) (progn (kill-buffer buf) (signal 'file-error (list "File is not readable" filename)))) (or (run-hook-with-args-until-success 'find-file-not-found-functions) (setq error t))))) (setq buffer-file-truename (if (equal filename buffer-file-name) truename (abbreviate-file-name (file-truename buffer-file-name)))) (setq buffer-file-number number) (if find-file-visit-truename (setq buffer-file-name (expand-file-name buffer-file-truename))) (setq default-directory (file-name-directory buffer-file-name)) (and backup-enable-predicate (not (funcall backup-enable-predicate buffer-file-name)) (set (make-local-variable 'backup-inhibited) t)) (if rawfile (let ((enable-local-variables nil)) (set-buffer-multibyte nil) (setq buffer-file-coding-system 'no-conversion) (set-buffer-major-mode buf) (set (make-local-variable 'find-file-literally) t)) (after-find-file error (not nowarn))) (current-buffer)) (let (error) (save-current-buffer (set-buffer buf) (kill-local-variable 'find-file-literally) (kill-local-variable 'buffer-file-coding-system) (kill-local-variable 'cursor-type) (let ((inhibit-read-only t)) (erase-buffer)) (and (not rawfile) (set-buffer-multibyte t)) (if rawfile (condition-case nil (let ((inhibit-read-only t) (enable-local-variables nil)) (insert-file-contents-literally filename t)) (file-error (if (and (file-exists-p filename) (not ...)) (progn (kill-buffer buf) (signal ... ...))) (setq error t))) (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-error (if (and (file-exists-p filename) (not ...)) (progn (kill-buffer buf) (signal ... ...))) (or (run-hook-with-args-until-success 'find-file-not-found-functions) (setq error t))))) (setq buffer-file-truename (if (equal filename buffer-file-name) truename (abbreviate-file-name (file-truename buffer-file-name)))) (setq buffer-file-number number) (if find-file-visit-truename (setq buffer-file-name (expand-file-name buffer-file-truename))) (setq default-directory (file-name-directory buffer-file-name)) (and backup-enable-predicate (not (funcall backup-enable-predicate buffer-file-name)) (set (make-local-variable 'backup-inhibited) t)) (if rawfile (let ((enable-local-variables nil)) (set-buffer-multibyte nil) (setq buffer-file-coding-system 'no-conversion) (set-buffer-major-mode buf) (set (make-local-variable 'find-file-literally) t)) (after-find-file error (not nowarn))) (current-buffer))) find-file-noselect-1(# "/tmp/bug.org" nil nil "/tmp/ bug.org" (127741036 26)) (if buf (let (nonexistent) (or nowarn (verify-visited-file-modtime buf) (cond ((not (file-exists-p filename)) (setq nonexistent t) (message "File %s no longer exists!" filename)) ((and (not (buffer-modified-p buf)) (let (... ...) (while tail ... ...) found)) (save-current-buffer (set-buffer buf) (message "Reverting file %s..." filename) (revert-buffer t t) (message "Reverting file %s...done" filename))) ((not query-about-changed-file) (message (substitute-command-keys "File %s changed on disk. \\[revert-buffer-quick] t...") (file-name-nondirectory filename) (if (buffer-modified-p buf) " and discard your edits" ""))) ((yes-or-no-p (if (string= ... ...) (format ... ...) (format ... ... ...))) (save-current-buffer (set-buffer buf) (revert-buffer t t))))) (save-current-buffer (set-buffer buf) (let ((read-only (not (file-writable-p buffer-file-name)))) (if (or nonexistent (eq read-only buffer-file-read-only) (eq read-only buffer-read-only)) nil (if (or nowarn (let* ... ...)) (progn (setq buffer-read-only read-only)))) (setq buffer-file-read-only read-only)) (if (or (eq (null rawfile) (null find-file-literally)) nonexistent (memq major-mode '(hexl-mode image-mode))) nil (if (buffer-modified-p) (if (let (...) (y-or-n-p ...)) (progn (save-buffer) (find-file-noselect-1 buf filename nowarn rawfile truename number)) (if (y-or-n-p ...) (find-file-noselect-1 buf filename nowarn rawfile truename number) (error ...))) (if (let (...) (y-or-n-p ...)) (find-file-noselect-1 buf filename nowarn rawfile truename number) (error (if rawfile "File already visited non-literally" "File already visited literally")))))) buf) (setq buf (create-file-buffer filename)) (find-file-noselect-1 buf filename nowarn rawfile truename number)) (let* ((buf (get-file-buffer filename)) (truename (abbreviate-file-name (file-truename filename))) (attributes (file-attributes truename)) (number (nthcdr 10 attributes)) (other (and (not buf) (find-buffer-visiting filename #'(lambda (buffer) (let ... ...)))))) (if other (progn (or nowarn find-file-suppress-same-file-warnings (string-equal filename (buffer-file-name other)) (files--message "%s and %s are the same file" filename (buffer-file-name other))) (if (or find-file-existing-other-name find-file-visit-truename) (setq buf other)))) (if (not (or buf nowarn)) (progn (if (eq (abort-if-file-too-large (file-attribute-size attributes) "open" filename (not rawfile)) 'raw) (progn (setq rawfile t))) (warn-maybe-out-of-memory (file-attribute-size attributes)))) (if buf (let (nonexistent) (or nowarn (verify-visited-file-modtime buf) (cond ((not (file-exists-p filename)) (setq nonexistent t) (message "File %s no longer exists!" filename)) ((and (not ...) (let ... ... found)) (save-current-buffer (set-buffer buf) (message "Reverting file %s..." filename) (revert-buffer t t) (message "Reverting file %s...done" filename))) ((not query-about-changed-file) (message (substitute-command-keys "File %s changed on disk. \\[revert-buffer-quick] t...") (file-name-nondirectory filename) (if ... " and discard your edits" ""))) ((yes-or-no-p (if ... ... ...)) (save-current-buffer (set-buffer buf) (revert-buffer t t))))) (save-current-buffer (set-buffer buf) (let ((read-only (not ...))) (if (or nonexistent (eq read-only buffer-file-read-only) (eq read-only buffer-read-only)) nil (if (or nowarn ...) (progn ...))) (setq buffer-file-read-only read-only)) (if (or (eq (null rawfile) (null find-file-literally)) nonexistent (memq major-mode '...)) nil (if (buffer-modified-p) (if (let ... ...) (progn ... ...) (if ... ... ...)) (if (let ... ...) (find-file-noselect-1 buf filename nowarn rawfile truename number) (error ...))))) buf) (setq buf (create-file-buffer filename)) (find-file-noselect-1 buf filename nowarn rawfile truename number))) (if (and wildcards find-file-wildcards (not (file-name-quoted-p filename)) (string-match "[[*?]" filename)) (let ((files (condition-case nil (file-expand-wildcards filename t) (error (list filename)))) (find-file-wildcards nil)) (if (null files) (find-file-noselect filename) (mapcar #'find-file-noselect files))) (let* ((buf (get-file-buffer filename)) (truename (abbreviate-file-name (file-truename filename))) (attributes (file-attributes truename)) (number (nthcdr 10 attributes)) (other (and (not buf) (find-buffer-visiting filename #'(lambda ... ...))))) (if other (progn (or nowarn find-file-suppress-same-file-warnings (string-equal filename (buffer-file-name other)) (files--message "%s and %s are the same file" filename (buffer-file-name other))) (if (or find-file-existing-other-name find-file-visit-truename) (setq buf other)))) (if (not (or buf nowarn)) (progn (if (eq (abort-if-file-too-large (file-attribute-size attributes) "open" filename (not rawfile)) 'raw) (progn (setq rawfile t))) (warn-maybe-out-of-memory (file-attribute-size attributes)))) (if buf (let (nonexistent) (or nowarn (verify-visited-file-modtime buf) (cond ((not ...) (setq nonexistent t) (message "File %s no longer exists!" filename)) ((and ... ...) (save-current-buffer ... ... ... ...)) ((not query-about-changed-file) (message ... ... ...)) ((yes-or-no-p ...) (save-current-buffer ... ...)))) (save-current-buffer (set-buffer buf) (let ((read-only ...)) (if (or nonexistent ... ...) nil (if ... ...)) (setq buffer-file-read-only read-only)) (if (or (eq ... ...) nonexistent (memq major-mode ...)) nil (if (buffer-modified-p) (if ... ... ...) (if ... ... ...)))) buf) (setq buf (create-file-buffer filename)) (find-file-noselect-1 buf filename nowarn rawfile truename number)))) (if (file-directory-p filename) (or (and find-file-run-dired (run-hook-with-args-until-success 'find-directory-functions (if find-file-visit-truename (abbreviate-file-name (file-truename filename)) filename))) (error "%s is a directory" filename)) (if (and wildcards find-file-wildcards (not (file-name-quoted-p filename)) (string-match "[[*?]" filename)) (let ((files (condition-case nil (file-expand-wildcards filename t) (error (list filename)))) (find-file-wildcards nil)) (if (null files) (find-file-noselect filename) (mapcar #'find-file-noselect files))) (let* ((buf (get-file-buffer filename)) (truename (abbreviate-file-name (file-truename filename))) (attributes (file-attributes truename)) (number (nthcdr 10 attributes)) (other (and (not buf) (find-buffer-visiting filename #'...)))) (if other (progn (or nowarn find-file-suppress-same-file-warnings (string-equal filename (buffer-file-name other)) (files--message "%s and %s are the same file" filename (buffer-file-name other))) (if (or find-file-existing-other-name find-file-visit-truename) (setq buf other)))) (if (not (or buf nowarn)) (progn (if (eq (abort-if-file-too-large ... "open" filename ...) 'raw) (progn (setq rawfile t))) (warn-maybe-out-of-memory (file-attribute-size attributes)))) (if buf (let (nonexistent) (or nowarn (verify-visited-file-modtime buf) (cond (... ... ...) (... ...) (... ...) (... ...))) (save-current-buffer (set-buffer buf) (let (...) (if ... nil ...) (setq buffer-file-read-only read-only)) (if (or ... nonexistent ...) nil (if ... ... ...))) buf) (setq buf (create-file-buffer filename)) (find-file-noselect-1 buf filename nowarn rawfile truename number))))) find-file-noselect("/tmp/bug.org" nil nil t) (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) (mapcar 'pop-to-buffer-same-window (nreverse value)) (pop-to-buffer-same-window value))) find-file("/tmp/bug.org" t) funcall-interactively(find-file "/tmp/bug.org" t) command-execute(find-file) --000000000000dff76b05e9311080 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
And another thing: do you have any clue (or maybe more t= han a clue)
what changes in Org wrt what's on the Emacs master branc= h could have
caused this?=C2=A0 If you do, can you show those changes, o= r point to the
specific places in Org files where those changes can be e= ye-balled?

I bisected Org repo and found th= e first bad commit. Unfortunately, it is not very useful.

The commit changed the order function calls in org-mode. Before the= commit,=C2=A0
`org-setup-filling' got called prior to `org-e= lement-cache-reset' and
=C2=A0`org-setup-filling' has an = explicit (require 'org-element) statement, which
=C2=A0 made = autoloading unnecessary in the past.=C2=A0

Would it help to make the backtrace m= ore detailed?=C2=A0 Right now, we
don't see anything between the call to normal-mode and the error.=C2=A0= If
you manually "M-x load-file RET files.el RET" before doing
eval-buffer, do you get a more detailed backtrace?


Doing load-file made no difference.
I can generate an alternative backtrace using debug-on-entry org-mo= de.
The debug buffer right before error is below

Debugger entered--beginning evaluation of function call form:
*= (org-element-cache-reset)
* (let ((delay-mode-hooks t)) (outline-mode) = (setq major-mode 'org-mode) (setq mode-name "Org") (progn (if= (get 'outline-mode 'mode-class) (put 'org-mode 'mode-class= (get 'outline-mode 'mode-class))) (if (keymap-parent org-mode-map)= nil (set-keymap-parent org-mode-map (current-local-map))) (let ((parent (c= har-table-parent org-mode-syntax-table))) (if (and parent (not (eq parent (= standard-syntax-table)))) nil (set-char-table-parent org-mode-syntax-table = (syntax-table)))) (if (or (abbrev-table-get org-mode-abbrev-table :parents)= (eq org-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put org-m= ode-abbrev-table :parents (list local-abbrev-table)))) (use-local-map org-m= ode-map) (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table = org-mode-abbrev-table) (set (make-local-variable 'org-mode-loading) t) = (org-load-modules-maybe) (if org-agenda-file-menu-enabled (progn (org-insta= ll-agenda-files-menu))) (if (and org-link-descriptive (eq org-fold-core-sty= le 'overlays)) (progn (add-to-invisibility-spec '(org-link)))) (org= -fold-initialize (or (and (stringp org-ellipsis) (not (equal "" o= rg-ellipsis)) org-ellipsis) "...")) (make-local-variable 'org= -link-descriptive) (if (eq org-fold-core-style 'overlays) (progn (add-t= o-invisibility-spec '(org-hide-block . t)))) (if org-link-descriptive (= org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) := visible nil) (org-fold-core-set-folding-spec-property (car org-link--link-f= olding-spec) :visible t)) (set (make-local-variable 'outline-regexp) or= g-outline-regexp) (set (make-local-variable 'outline-level) 'org-ou= tline-level) (if (and (stringp org-ellipsis) (not (equal "" org-e= llipsis))) (progn (if org-display-table nil (setq org-display-table (make-d= isplay-table))) (set-display-table-slot org-display-table 4 (vconcat (mapca= r #'(lambda ... ...) org-ellipsis))) (setq buffer-display-table org-dis= play-table))) (org-set-regexps-and-options) (org-set-font-lock-defaults) (i= f (and org-tag-faces (not org-tags-special-faces-re)) (progn (org-set-tag-f= aces 'org-tag-faces org-tag-faces))) (set (make-local-variable 'cal= c-embedded-open-mode) "# ") (modify-syntax-entry 34 "\"= ") (modify-syntax-entry 92 "_") (modify-syntax-entry 126 &qu= ot;_") (modify-syntax-entry 60 "(>") (modify-syntax-entry= 62 ")<") (set (make-local-variable 'font-lock-unfontify-r= egion-function) 'org-unfontify-region) (set (make-local-variable 'o= rg-table-may-need-update) t) (add-hook 'before-change-functions 'or= g-before-change-function nil 'local) (add-hook 'kill-buffer-hook &#= 39;org-check-running-clock nil 'local) (org-element-cache-reset) (if (a= nd org-element-cache-persistent org-element-use-cache) (progn (org-persist-= load 'org-element--cache (current-buffer) t))) (org-macro-initialize-te= mplates) (org-update-radio-target-regexp) (set (make-local-variable 'in= dent-line-function) 'org-indent-line) (set (make-local-variable 'in= dent-region-function) 'org-indent-region) (org-setup-filling) (org-setu= p-comments-handling) (set (make-local-variable 'beginning-of-defun-func= tion) 'org-backward-element) (set (make-local-variable 'end-of-defu= n-function) #'(lambda nil (if (not (org-at-heading-p)) (org-forward-ele= ment) (org-forward-element) (forward-char -1)))) (set (make-local-variable = 'next-error-function) 'org-occur-next-match) (set (make-local-varia= ble 'add-log-current-defun-function) #'org-add-log-current-headline= ) (if org-enforce-todo-dependencies (add-hook 'org-blocker-hook 'or= g-block-todo-from-children-or-siblings-or-parent) (remove-hook 'org-blo= cker-hook 'org-block-todo-from-children-or-siblings-or-parent)) (if org= -enforce-todo-checkbox-dependencies (add-hook 'org-blocker-hook 'or= g-block-todo-from-checkboxes) (remove-hook 'org-blocker-hook 'org-b= lock-todo-from-checkboxes)) (set (make-local-variable 'align-mode-rules= -list) '((org-in-buffer-settings (regexp . "^[ \11]*#\\+[A-Z_]+:\\= (\\s-*\\)\\S-+") (modes quote (org-mode))))) (set (make-local-variable= 'pcomplete-command-completion-function) #'org-pcomplete-initial) (= set (make-local-variable 'pcomplete-command-name-function) #'org-co= mmand-at-point) ...)
* (progn (make-local-variable 'delay-mode-hooks= ) (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode 'org-mode= ) (setq mode-name "Org") (progn (if (get 'outline-mode 'm= ode-class) (put 'org-mode 'mode-class (get 'outline-mode 'm= ode-class))) (if (keymap-parent org-mode-map) nil (set-keymap-parent org-mo= de-map (current-local-map))) (let ((parent (char-table-parent org-mode-synt= ax-table))) (if (and parent (not (eq parent ...))) nil (set-char-table-pare= nt org-mode-syntax-table (syntax-table)))) (if (or (abbrev-table-get org-mo= de-abbrev-table :parents) (eq org-mode-abbrev-table local-abbrev-table)) ni= l (abbrev-table-put org-mode-abbrev-table :parents (list local-abbrev-table= )))) (use-local-map org-mode-map) (set-syntax-table org-mode-syntax-table) = (setq local-abbrev-table org-mode-abbrev-table) (set (make-local-variable &= #39;org-mode-loading) t) (org-load-modules-maybe) (if org-agenda-file-menu-= enabled (progn (org-install-agenda-files-menu))) (if (and org-link-descript= ive (eq org-fold-core-style 'overlays)) (progn (add-to-invisibility-spe= c '(org-link)))) (org-fold-initialize (or (and (stringp org-ellipsis) (= not (equal "" org-ellipsis)) org-ellipsis) "...")) (mak= e-local-variable 'org-link-descriptive) (if (eq org-fold-core-style = 9;overlays) (progn (add-to-invisibility-spec '(org-hide-block . t)))) (= if org-link-descriptive (org-fold-core-set-folding-spec-property (car org-l= ink--link-folding-spec) :visible nil) (org-fold-core-set-folding-spec-prope= rty (car org-link--link-folding-spec) :visible t)) (set (make-local-variabl= e 'outline-regexp) org-outline-regexp) (set (make-local-variable 'o= utline-level) 'org-outline-level) (if (and (stringp org-ellipsis) (not = (equal "" org-ellipsis))) (progn (if org-display-table nil (setq = org-display-table (make-display-table))) (set-display-table-slot org-displa= y-table 4 (vconcat (mapcar #'... org-ellipsis))) (setq buffer-display-t= able org-display-table))) (org-set-regexps-and-options) (org-set-font-lock-= defaults) (if (and org-tag-faces (not org-tags-special-faces-re)) (progn (o= rg-set-tag-faces 'org-tag-faces org-tag-faces))) (set (make-local-varia= ble 'calc-embedded-open-mode) "# ") (modify-syntax-entry 34 &= quot;\"") (modify-syntax-entry 92 "_") (modify-syntax-e= ntry 126 "_") (modify-syntax-entry 60 "(>") (modify-= syntax-entry 62 ")<") (set (make-local-variable 'font-lock= -unfontify-region-function) 'org-unfontify-region) (set (make-local-var= iable 'org-table-may-need-update) t) (add-hook 'before-change-funct= ions 'org-before-change-function nil 'local) (add-hook 'kill-bu= ffer-hook 'org-check-running-clock nil 'local) (org-element-cache-r= eset) (if (and org-element-cache-persistent org-element-use-cache) (progn (= org-persist-load 'org-element--cache (current-buffer) t))) (org-macro-i= nitialize-templates) (org-update-radio-target-regexp) (set (make-local-vari= able 'indent-line-function) 'org-indent-line) (set (make-local-vari= able 'indent-region-function) 'org-indent-region) (org-setup-fillin= g) (org-setup-comments-handling) (set (make-local-variable 'beginning-o= f-defun-function) 'org-backward-element) (set (make-local-variable '= ;end-of-defun-function) #'(lambda nil (if (not (org-at-heading-p)) (org= -forward-element) (org-forward-element) (forward-char -1)))) (set (make-loc= al-variable 'next-error-function) 'org-occur-next-match) (set (make= -local-variable 'add-log-current-defun-function) #'org-add-log-curr= ent-headline) (if org-enforce-todo-dependencies (add-hook 'org-blocker-= hook 'org-block-todo-from-children-or-siblings-or-parent) (remove-hook = 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-pare= nt)) (if org-enforce-todo-checkbox-dependencies (add-hook 'org-blocker-= hook 'org-block-todo-from-checkboxes) (remove-hook 'org-blocker-hoo= k 'org-block-todo-from-checkboxes)) (set (make-local-variable 'alig= n-mode-rules-list) '((org-in-buffer-settings (regexp . "^[ \11]*#\= \+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes quote (org-mode))))) (set (make-lo= cal-variable 'pcomplete-command-completion-function) #'org-pcomplet= e-initial) (set (make-local-variable 'pcomplete-command-name-function) = #'org-command-at-point) ...))
* (closure (org-mode-abbrev-table org-= mode-syntax-table org-element-use-cache org-element-cache-persistent buffer= -face-mode-face org-tbl-menu org-org-menu org-struct-menu org-entities org-= last-state org-id-track-globally org-clock-start-time texmathp-why remember= -data-file org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist = calc-embedded-open-mode calc-embedded-open-formula calc-embedded-close-form= ula align-mode-rules-list org-emphasis-alist org-emphasis-regexp-components= org-export-registered-backends org-modules crm-separator org-babel-load-la= nguages org-id-overriding-file-name org-indent-indentation-per-level org-el= ement--timestamp-regexp org-element-cache-map-continue-from org-element-par= agraph-separate org-agenda-buffer-name org-inlinetask-min-level t) nil &quo= t;Outline-based notes management and organizer, alia..." (interactive)= (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks= t)) (outline-mode) (setq major-mode 'org-mode) (setq mode-name "O= rg") (progn (if (get 'outline-mode 'mode-class) (put 'org-= mode 'mode-class (get 'outline-mode 'mode-class))) (if (keymap-= parent org-mode-map) nil (set-keymap-parent org-mode-map (current-local-map= ))) (let ((parent (char-table-parent org-mode-syntax-table))) (if (and pare= nt (not ...)) nil (set-char-table-parent org-mode-syntax-table (syntax-tabl= e)))) (if (or (abbrev-table-get org-mode-abbrev-table :parents) (eq org-mod= e-abbrev-table local-abbrev-table)) nil (abbrev-table-put org-mode-abbrev-t= able :parents (list local-abbrev-table)))) (use-local-map org-mode-map) (se= t-syntax-table org-mode-syntax-table) (setq local-abbrev-table org-mode-abb= rev-table) (set (make-local-variable 'org-mode-loading) t) (org-load-mo= dules-maybe) (if org-agenda-file-menu-enabled (progn (org-install-agenda-fi= les-menu))) (if (and org-link-descriptive (eq org-fold-core-style 'over= lays)) (progn (add-to-invisibility-spec '(org-link)))) (org-fold-initia= lize (or (and (stringp org-ellipsis) (not (equal "" org-ellipsis)= ) org-ellipsis) "...")) (make-local-variable 'org-link-descri= ptive) (if (eq org-fold-core-style 'overlays) (progn (add-to-invisibili= ty-spec '(org-hide-block . t)))) (if org-link-descriptive (org-fold-cor= e-set-folding-spec-property (car org-link--link-folding-spec) :visible nil)= (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec)= :visible t)) (set (make-local-variable 'outline-regexp) org-outline-re= gexp) (set (make-local-variable 'outline-level) 'org-outline-level)= (if (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) (= progn (if org-display-table nil (setq org-display-table (make-display-table= ))) (set-display-table-slot org-display-table 4 (vconcat (mapcar ... org-el= lipsis))) (setq buffer-display-table org-display-table))) (org-set-regexps-= and-options) (org-set-font-lock-defaults) (if (and org-tag-faces (not org-t= ags-special-faces-re)) (progn (org-set-tag-faces 'org-tag-faces org-tag= -faces))) (set (make-local-variable 'calc-embedded-open-mode) "# &= quot;) (modify-syntax-entry 34 "\"") (modify-syntax-entry 92= "_") (modify-syntax-entry 126 "_") (modify-syntax-entr= y 60 "(>") (modify-syntax-entry 62 ")<") (set (ma= ke-local-variable 'font-lock-unfontify-region-function) 'org-unfont= ify-region) (set (make-local-variable 'org-table-may-need-update) t) (a= dd-hook 'before-change-functions 'org-before-change-function nil &#= 39;local) (add-hook 'kill-buffer-hook 'org-check-running-clock nil = 'local) (org-element-cache-reset) (if (and org-element-cache-persistent= org-element-use-cache) (progn (org-persist-load 'org-element--cache (c= urrent-buffer) t))) (org-macro-initialize-templates) (org-update-radio-targ= et-regexp) (set (make-local-variable 'indent-line-function) 'org-in= dent-line) (set (make-local-variable 'indent-region-function) 'org-= indent-region) (org-setup-filling) (org-setup-comments-handling) (set (make= -local-variable 'beginning-of-defun-function) 'org-backward-element= ) (set (make-local-variable 'end-of-defun-function) #'(lambda nil (= if (not ...) (org-forward-element) (org-forward-element) (forward-char -1))= )) (set (make-local-variable 'next-error-function) 'org-occur-next-= match) (set (make-local-variable 'add-log-current-defun-function) #'= ;org-add-log-current-headline) (if org-enforce-todo-dependencies (add-hook = 'org-blocker-hook 'org-block-todo-from-children-or-siblings-or-pare= nt) (remove-hook 'org-blocker-hook 'org-block-todo-from-children-or= -siblings-or-parent)) (if org-enforce-todo-checkbox-dependencies (add-hook = 'org-blocker-hook 'org-block-todo-from-checkboxes) (remove-hook = 9;org-blocker-hook 'org-block-todo-from-checkboxes)) (set (make-local-v= ariable 'align-mode-rules-list) '((org-in-buffer-settings (regexp .= "^[ \11]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes quote ...)))) (se= t (make-local-variable 'pcomplete-command-completion-function) #'or= g-pcomplete-initial) (set (make-local-variable 'pcomplete-command-name-= function) #'org-command-at-point) ...)) (run-mode-hooks 'org-mode-h= ook))()
* apply((closure (org-mode-abbrev-table org-mode-syntax-table or= g-element-use-cache org-element-cache-persistent buffer-face-mode-face org-= tbl-menu org-org-menu org-struct-menu org-entities org-last-state org-id-tr= ack-globally org-clock-start-time texmathp-why remember-data-file org-agend= a-tags-todo-honor-ignore-options iswitchb-temp-buflist calc-embedded-open-m= ode calc-embedded-open-formula calc-embedded-close-formula align-mode-rules= -list org-emphasis-alist org-emphasis-regexp-components org-export-register= ed-backends org-modules crm-separator org-babel-load-languages org-id-overr= iding-file-name org-indent-indentation-per-level org-element--timestamp-reg= exp org-element-cache-map-continue-from org-element-paragraph-separate org-= agenda-buffer-name org-inlinetask-min-level t) nil "Outline-based note= s management and organizer, alia..." (interactive) (progn (make-local-= variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (outline-mode) = (setq major-mode 'org-mode) (setq mode-name "Org") (progn (if= (get 'outline-mode 'mode-class) (put 'org-mode 'mode-class= (get ... ...))) (if (keymap-parent org-mode-map) nil (set-keymap-parent or= g-mode-map (current-local-map))) (let ((parent ...)) (if (and parent ...) n= il (set-char-table-parent org-mode-syntax-table ...))) (if (or (abbrev-tabl= e-get org-mode-abbrev-table :parents) (eq org-mode-abbrev-table local-abbre= v-table)) nil (abbrev-table-put org-mode-abbrev-table :parents (list local-= abbrev-table)))) (use-local-map org-mode-map) (set-syntax-table org-mode-sy= ntax-table) (setq local-abbrev-table org-mode-abbrev-table) (set (make-loca= l-variable 'org-mode-loading) t) (org-load-modules-maybe) (if org-agend= a-file-menu-enabled (progn (org-install-agenda-files-menu))) (if (and org-l= ink-descriptive (eq org-fold-core-style 'overlays)) (progn (add-to-invi= sibility-spec '...))) (org-fold-initialize (or (and (stringp org-ellips= is) (not ...) org-ellipsis) "...")) (make-local-variable 'org= -link-descriptive) (if (eq org-fold-core-style 'overlays) (progn (add-t= o-invisibility-spec '...))) (if org-link-descriptive (org-fold-core-set= -folding-spec-property (car org-link--link-folding-spec) :visible nil) (org= -fold-core-set-folding-spec-property (car org-link--link-folding-spec) :vis= ible t)) (set (make-local-variable 'outline-regexp) org-outline-regexp)= (set (make-local-variable 'outline-level) 'org-outline-level) (if = (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) (progn= (if org-display-table nil (setq org-display-table ...)) (set-display-table= -slot org-display-table 4 (vconcat ...)) (setq buffer-display-table org-dis= play-table))) (org-set-regexps-and-options) (org-set-font-lock-defaults) (i= f (and org-tag-faces (not org-tags-special-faces-re)) (progn (org-set-tag-f= aces 'org-tag-faces org-tag-faces))) (set (make-local-variable 'cal= c-embedded-open-mode) "# ") (modify-syntax-entry 34 "\"= ") (modify-syntax-entry 92 "_") (modify-syntax-entry 126 &qu= ot;_") (modify-syntax-entry 60 "(>") (modify-syntax-entry= 62 ")<") (set (make-local-variable 'font-lock-unfontify-r= egion-function) 'org-unfontify-region) (set (make-local-variable 'o= rg-table-may-need-update) t) (add-hook 'before-change-functions 'or= g-before-change-function nil 'local) (add-hook 'kill-buffer-hook &#= 39;org-check-running-clock nil 'local) (org-element-cache-reset) (if (a= nd org-element-cache-persistent org-element-use-cache) (progn (org-persist-= load 'org-element--cache (current-buffer) t))) (org-macro-initialize-te= mplates) (org-update-radio-target-regexp) (set (make-local-variable 'in= dent-line-function) 'org-indent-line) (set (make-local-variable 'in= dent-region-function) 'org-indent-region) (org-setup-filling) (org-setu= p-comments-handling) (set (make-local-variable 'beginning-of-defun-func= tion) 'org-backward-element) (set (make-local-variable 'end-of-defu= n-function) #'(lambda nil (if ... ... ... ...))) (set (make-local-varia= ble 'next-error-function) 'org-occur-next-match) (set (make-local-v= ariable 'add-log-current-defun-function) #'org-add-log-current-head= line) (if org-enforce-todo-dependencies (add-hook 'org-blocker-hook = 9;org-block-todo-from-children-or-siblings-or-parent) (remove-hook 'org= -blocker-hook 'org-block-todo-from-children-or-siblings-or-parent)) (if= org-enforce-todo-checkbox-dependencies (add-hook 'org-blocker-hook = 9;org-block-todo-from-checkboxes) (remove-hook 'org-blocker-hook 'o= rg-block-todo-from-checkboxes)) (set (make-local-variable 'align-mode-r= ules-list) '((org-in-buffer-settings ... ...))) (set (make-local-variab= le 'pcomplete-command-completion-function) #'org-pcomplete-initial)= (set (make-local-variable 'pcomplete-command-name-function) #'org-= command-at-point) ...)) (run-mode-hooks 'org-mode-hook)) nil)
* org-= mode()
=C2=A0 funcall(org-mode)
=C2=A0 (progn (funcall mode) mode)=C2=A0 (if mode (progn (funcall mode) mode))
=C2=A0 (if (and keep-mode-= if-same (eq (indirect-function mode) (indirect-function major-mode))) nil (= if mode (progn (funcall mode) mode)))
=C2=A0 set-auto-mode-0(org-mode ni= l)
=C2=A0 (progn (set-auto-mode-0 mode keep-mode-if-same) t)
=C2=A0 (= if mode (progn (set-auto-mode-0 mode keep-mode-if-same) t))
=C2=A0 (let = (mode (name buffer-file-name) (remote-id (file-remote-p buffer-file-name)) = (case-insensitive-p (file-name-case-insensitive-p buffer-file-name))) (setq= name (file-name-sans-versions name)) (if (and (stringp remote-id) (string-= match (regexp-quote remote-id) name)) (progn (setq name (substring name (ma= tch-end 0))))) (while name (setq mode (if case-insensitive-p (let ((case-fo= ld-search t)) (assoc-default name alist 'string-match)) (or (let ((case= -fold-search nil)) (assoc-default name alist 'string-match)) (and auto-= mode-case-fold (let (...) (assoc-default name alist ...)))))) (if (and mode= (not (functionp mode)) (consp mode) (car (cdr mode))) (progn (setq mode (c= ar mode)) (setq name (substring name 0 (match-beginning 0)))) (setq name ni= l))) (if (and dir-local mode (not (set-auto-mode--dir-local-valid-p mode)))= (progn (message "Ignoring invalid mode `%s'" mode) (setq mod= e nil))) (if mode (progn (set-auto-mode-0 mode keep-mode-if-same) t)))
= =C2=A0 (if buffer-file-name (let (mode (name buffer-file-name) (remote-id (= file-remote-p buffer-file-name)) (case-insensitive-p (file-name-case-insens= itive-p buffer-file-name))) (setq name (file-name-sans-versions name)) (if = (and (stringp remote-id) (string-match (regexp-quote remote-id) name)) (pro= gn (setq name (substring name (match-end 0))))) (while name (setq mode (if = case-insensitive-p (let ((case-fold-search t)) (assoc-default name alist &#= 39;string-match)) (or (let (...) (assoc-default name alist ...)) (and auto-= mode-case-fold (let ... ...))))) (if (and mode (not (functionp mode)) (cons= p mode) (car (cdr mode))) (progn (setq mode (car mode)) (setq name (substri= ng name 0 (match-beginning 0)))) (setq name nil))) (if (and dir-local mode = (not (set-auto-mode--dir-local-valid-p mode))) (progn (message "Ignori= ng invalid mode `%s'" mode) (setq mode nil))) (if mode (progn (set= -auto-mode-0 mode keep-mode-if-same) t))))
=C2=A0 set-auto-mode--apply-a= list((("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("= ;\\.elc\\'" . elisp-byte-code-mode) ("\\.\\(?:3fr\\|a\\(?:rw\= \|vs\\)\\|bmp[23]?\\|c\\(?:als?\\|myk..." . image-mode) ("\\.zst\= \'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("= ;\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-comp= r) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil = jka-compr) ("\\.bz2\\'" nil jka-compr) ("\\.Z\\'&quo= t; nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ("\\(?:\= \.\\(?:rbw?\\|ru\\|rake\\|thor\\|jbuilder\\|rabl\\|ge..." . ruby-mode)= ("\\.re?st\\'" . rst-mode) ("\\.py[iw]?\\'" . = python-mode) ("\\.m\\'" . octave-maybe-mode) ("\\.less\\= '" . less-css-mode) ("\\.scss\\'" . scss-mode) (&quo= t;\\.awk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\= \)?\\)\\'" . pike-mode) ("\\.idl\\'" . idl-mode) (&q= uot;\\.java\\'" . java-mode) ("\\.m\\'" . objc-mode)= ("\\.ii\\'" . c++-mode) ("\\.i\\'" . c-mode) (= "\\.lex\\'" . c-mode) ("\\.y\\(acc\\)?\\'" . c-= mode) ("\\.h\\'" . c-or-c++-mode) ("\\.c\\'" . = c-mode) ("\\.\\(CC?\\|HH?\\)\\'" . c++-mode) ("\\.[ch]\\= (pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) ("\\.\\(cc\\|hh\\)\\'= ;" . c++-mode) ("\\.\\(bat\\|cmd\\)\\'" . bat-mode) (&qu= ot;\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . mhtml-mode) ("\\.s= vgz?\\'" . image-mode) ("\\.svgz?\\'" . xml-mode) (&= quot;\\.x[bp]m\\'" . image-mode) ("\\.x[bp]m\\'" . c= -mode) ("\\.p[bpgn]m\\'" . image-mode) ("\\.tiff?\\'= " . image-mode) ("\\.gif\\'" . image-mode) ("\\.png= \\'" . image-mode) ("\\.jpe?g\\'" . image-mode) (&qu= ot;\\.webp\\'" . image-mode) ("\\.te?xt\\'" . text-m= ode) ("\\.[tT]e[xX]\\'" . tex-mode) ("\\.ins\\'"= ; . tex-mode) ("\\.ltx\\'" . latex-mode) ("\\.dtx\\'= " . doctex-mode) ("\\.org\\'" . org-mode) ...) nil nil)<= br>=C2=A0 (setq done (set-auto-mode--apply-alist auto-mode-alist keep-mode-= if-same nil))
=C2=A0 (if done nil (setq done (set-auto-mode--apply-alist= auto-mode-alist keep-mode-if-same nil)))
=C2=A0 (let ((try-locals (not = (inhibit-local-variables-p))) end done mode modes) (save-excursion (goto-ch= ar (point-min)) (skip-chars-forward " \11\n") (and enable-local-v= ariables try-locals (setq end (set-auto-mode-1)) (if (save-excursion (searc= h-forward ":" end t)) (while (let ((case-fold-search t)) (or (and= ... ...) (re-search-forward "[ \11;]mode:" end t))) (skip-chars-= forward " \11") (let ((beg ...)) (if (search-forward ";"= ; end t) (forward-char -1) (goto-char end)) (skip-chars-backward " \11= ") (setq modes (cons ... modes)))) (setq modes (cons (intern (concat .= .. "-mode")) modes))))) (if modes (catch 'nop (let ((--dolist= -tail-- (nreverse modes))) (while --dolist-tail-- (let ((mode ...)) (if (no= t ...) (message "Ignoring unknown mode `%s'" mode) (setq done= t) (or ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))))) (if don= e nil (condition-case err (let* ((mode-alist (cdr (hack-dir-local--get-vari= ables ...)))) (setq done (set-auto-mode--apply-alist mode-alist keep-mode-i= f-same t))) ((debug error) (message "Directory-local variables error: = %s" err) nil))) (and (not done) (setq mode (hack-local-variables t (no= t try-locals))) (not (memq mode modes)) (if (not (functionp mode)) (message= "Ignoring unknown mode `%s'" mode) (setq done t) (set-auto-m= ode-0 mode keep-mode-if-same))) (and (not done) (setq mode (save-excursion = (goto-char (point-min)) (if (looking-at auto-mode-interpreter-regexp) (matc= h-string 2)))) (setq done (assoc-default (file-name-nondirectory mode) (map= car #'(lambda (e) (cons ... ...)) interpreter-mode-alist) #'string-= match-p)) (set-auto-mode-0 done keep-mode-if-same)) (if done nil (if (setq = done (save-excursion (goto-char (point-min)) (save-restriction (narrow-to-r= egion (point-min) (min ... ...)) (assoc-default nil magic-mode-alist #'= ...)))) (set-auto-mode-0 done keep-mode-if-same))) (if done nil (setq done = (set-auto-mode--apply-alist auto-mode-alist keep-mode-if-same nil))) (if do= ne nil (if (setq done (save-excursion (goto-char (point-min)) (save-restric= tion (narrow-to-region (point-min) (min ... ...)) (assoc-default nil magic-= fallback-mode-alist #'...)))) (set-auto-mode-0 done keep-mode-if-same))= ) (if done nil (set-buffer-major-mode (current-buffer))))
=C2=A0 set-aut= o-mode()
=C2=A0 (condition-case err (set-auto-mode) ((debug error) (mess= age "File mode specification error: %s" err) nil))
=C2=A0 (let= ((enable-local-variables (or (not find-file) enable-local-variables))) (co= ndition-case err (set-auto-mode) ((debug error) (message "File mode sp= ecification error: %s" err) nil)) (if delay-mode-hooks (progn (conditi= on-case err (hack-local-variables 'no-mode) ((debug error) (message &qu= ot;File local-variables error: %s" err) nil)))))
=C2=A0 normal-mode= (t)
=C2=A0 (if nomodes nil (if (and view-read-only view-mode) (progn (vi= ew-mode -1))) (normal-mode t) (and (memq require-final-newline '(visit = visit-save)) (> (point-max) (point-min)) (/=3D (char-after (1- (point-ma= x))) 10) (not (and (eq selective-display t) (=3D (char-after (1- (point-max= ))) 13))) (not buffer-read-only) (save-excursion (goto-char (point-max)) (c= ondition-case nil (progn (insert "\n")) (error nil)))) (if (and b= uffer-read-only view-read-only (not (eq (get major-mode 'mode-class) &#= 39;special))) (progn (view-mode-enter))) (run-hooks 'find-file-hook))=C2=A0 after-find-file(nil t)
=C2=A0 (if rawfile (let ((enable-local-v= ariables nil)) (set-buffer-multibyte nil) (setq buffer-file-coding-system &= #39;no-conversion) (set-buffer-major-mode buf) (set (make-local-variable &#= 39;find-file-literally) t)) (after-find-file error (not nowarn)))
=C2=A0= (save-current-buffer (set-buffer buf) (kill-local-variable 'find-file-= literally) (kill-local-variable 'buffer-file-coding-system) (kill-local= -variable 'cursor-type) (let ((inhibit-read-only t)) (erase-buffer)) (a= nd (not rawfile) (set-buffer-multibyte t)) (if rawfile (condition-case nil = (let ((inhibit-read-only t) (enable-local-variables nil)) (insert-file-cont= ents-literally filename t)) (file-error (if (and (file-exists-p filename) (= not (file-readable-p filename))) (progn (kill-buffer buf) (signal 'file= -error (list "File is not readable" filename)))) (setq error t)))= (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents fil= ename t)) (file-error (if (and (file-exists-p filename) (not (file-readable= -p filename))) (progn (kill-buffer buf) (signal 'file-error (list "= ;File is not readable" filename)))) (or (run-hook-with-args-until-succ= ess 'find-file-not-found-functions) (setq error t))))) (setq buffer-fil= e-truename (if (equal filename buffer-file-name) truename (abbreviate-file-= name (file-truename buffer-file-name)))) (setq buffer-file-number number) (= if find-file-visit-truename (setq buffer-file-name (expand-file-name buffer= -file-truename))) (setq default-directory (file-name-directory buffer-file-= name)) (and backup-enable-predicate (not (funcall backup-enable-predicate b= uffer-file-name)) (set (make-local-variable 'backup-inhibited) t)) (if = rawfile (let ((enable-local-variables nil)) (set-buffer-multibyte nil) (set= q buffer-file-coding-system 'no-conversion) (set-buffer-major-mode buf)= (set (make-local-variable 'find-file-literally) t)) (after-find-file e= rror (not nowarn))) (current-buffer))
=C2=A0 (let (error) (save-current-= buffer (set-buffer buf) (kill-local-variable 'find-file-literally) (kil= l-local-variable 'buffer-file-coding-system) (kill-local-variable '= cursor-type) (let ((inhibit-read-only t)) (erase-buffer)) (and (not rawfile= ) (set-buffer-multibyte t)) (if rawfile (condition-case nil (let ((inhibit-= read-only t) (enable-local-variables nil)) (insert-file-contents-literally = filename t)) (file-error (if (and (file-exists-p filename) (not ...)) (prog= n (kill-buffer buf) (signal ... ...))) (setq error t))) (condition-case nil= (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-erro= r (if (and (file-exists-p filename) (not ...)) (progn (kill-buffer buf) (si= gnal ... ...))) (or (run-hook-with-args-until-success 'find-file-not-fo= und-functions) (setq error t))))) (setq buffer-file-truename (if (equal fil= ename buffer-file-name) truename (abbreviate-file-name (file-truename buffe= r-file-name)))) (setq buffer-file-number number) (if find-file-visit-truena= me (setq buffer-file-name (expand-file-name buffer-file-truename))) (setq d= efault-directory (file-name-directory buffer-file-name)) (and backup-enable= -predicate (not (funcall backup-enable-predicate buffer-file-name)) (set (m= ake-local-variable 'backup-inhibited) t)) (if rawfile (let ((enable-loc= al-variables nil)) (set-buffer-multibyte nil) (setq buffer-file-coding-syst= em 'no-conversion) (set-buffer-major-mode buf) (set (make-local-variabl= e 'find-file-literally) t)) (after-find-file error (not nowarn))) (curr= ent-buffer)))
=C2=A0 find-file-noselect-1(#<buffer bug.org> "/tmp/bug.org&= quot; nil nil "/tmp/bug.org" (1277= 41036 26))
=C2=A0 (if buf (let (nonexistent) (or nowarn (verify-visited-= file-modtime buf) (cond ((not (file-exists-p filename)) (setq nonexistent t= ) (message "File %s no longer exists!" filename)) ((and (not (buf= fer-modified-p buf)) (let (... ...) (while tail ... ...) found)) (save-curr= ent-buffer (set-buffer buf) (message "Reverting file %s..." filen= ame) (revert-buffer t t) (message "Reverting file %s...done" file= name))) ((not query-about-changed-file) (message (substitute-command-keys &= quot;File %s changed on disk. =C2=A0\\[revert-buffer-quick] t...") (fi= le-name-nondirectory filename) (if (buffer-modified-p buf) " and disca= rd your edits" ""))) ((yes-or-no-p (if (string=3D ... ...) (= format ... ...) (format ... ... ...))) (save-current-buffer (set-buffer buf= ) (revert-buffer t t))))) (save-current-buffer (set-buffer buf) (let ((read= -only (not (file-writable-p buffer-file-name)))) (if (or nonexistent (eq re= ad-only buffer-file-read-only) (eq read-only buffer-read-only)) nil (if (or= nowarn (let* ... ...)) (progn (setq buffer-read-only read-only)))) (setq b= uffer-file-read-only read-only)) (if (or (eq (null rawfile) (null find-file= -literally)) nonexistent (memq major-mode '(hexl-mode image-mode))) nil= (if (buffer-modified-p) (if (let (...) (y-or-n-p ...)) (progn (save-buffer= ) (find-file-noselect-1 buf filename nowarn rawfile truename number)) (if (= y-or-n-p ...) (find-file-noselect-1 buf filename nowarn rawfile truename nu= mber) (error ...))) (if (let (...) (y-or-n-p ...)) (find-file-noselect-1 bu= f filename nowarn rawfile truename number) (error (if rawfile "File al= ready visited non-literally" "File already visited literally"= ;)))))) buf) (setq buf (create-file-buffer filename)) (find-file-noselect-1= buf filename nowarn rawfile truename number))
=C2=A0 (let* ((buf (get-f= ile-buffer filename)) (truename (abbreviate-file-name (file-truename filena= me))) (attributes (file-attributes truename)) (number (nthcdr 10 attributes= )) (other (and (not buf) (find-buffer-visiting filename #'(lambda (buff= er) (let ... ...)))))) (if other (progn (or nowarn find-file-suppress-same-= file-warnings (string-equal filename (buffer-file-name other)) (files--mess= age "%s and %s are the same file" filename (buffer-file-name othe= r))) (if (or find-file-existing-other-name find-file-visit-truename) (setq = buf other)))) (if (not (or buf nowarn)) (progn (if (eq (abort-if-file-too-l= arge (file-attribute-size attributes) "open" filename (not rawfil= e)) 'raw) (progn (setq rawfile t))) (warn-maybe-out-of-memory (file-att= ribute-size attributes)))) (if buf (let (nonexistent) (or nowarn (verify-vi= sited-file-modtime buf) (cond ((not (file-exists-p filename)) (setq nonexis= tent t) (message "File %s no longer exists!" filename)) ((and (no= t ...) (let ... ... found)) (save-current-buffer (set-buffer buf) (message = "Reverting file %s..." filename) (revert-buffer t t) (message &qu= ot;Reverting file %s...done" filename))) ((not query-about-changed-fil= e) (message (substitute-command-keys "File %s changed on disk. =C2=A0\= \[revert-buffer-quick] t...") (file-name-nondirectory filename) (if ..= . " and discard your edits" ""))) ((yes-or-no-p (if ...= ... ...)) (save-current-buffer (set-buffer buf) (revert-buffer t t))))) (s= ave-current-buffer (set-buffer buf) (let ((read-only (not ...))) (if (or no= nexistent (eq read-only buffer-file-read-only) (eq read-only buffer-read-on= ly)) nil (if (or nowarn ...) (progn ...))) (setq buffer-file-read-only read= -only)) (if (or (eq (null rawfile) (null find-file-literally)) nonexistent = (memq major-mode '...)) nil (if (buffer-modified-p) (if (let ... ...) (= progn ... ...) (if ... ... ...)) (if (let ... ...) (find-file-noselect-1 bu= f filename nowarn rawfile truename number) (error ...))))) buf) (setq buf (= create-file-buffer filename)) (find-file-noselect-1 buf filename nowarn raw= file truename number)))
=C2=A0 (if (and wildcards find-file-wildcards (n= ot (file-name-quoted-p filename)) (string-match "[[*?]" filename)= ) (let ((files (condition-case nil (file-expand-wildcards filename t) (erro= r (list filename)))) (find-file-wildcards nil)) (if (null files) (find-file= -noselect filename) (mapcar #'find-file-noselect files))) (let* ((buf (= get-file-buffer filename)) (truename (abbreviate-file-name (file-truename f= ilename))) (attributes (file-attributes truename)) (number (nthcdr 10 attri= butes)) (other (and (not buf) (find-buffer-visiting filename #'(lambda = ... ...))))) (if other (progn (or nowarn find-file-suppress-same-file-warni= ngs (string-equal filename (buffer-file-name other)) (files--message "= %s and %s are the same file" filename (buffer-file-name other))) (if (= or find-file-existing-other-name find-file-visit-truename) (setq buf other)= ))) (if (not (or buf nowarn)) (progn (if (eq (abort-if-file-too-large (file= -attribute-size attributes) "open" filename (not rawfile)) 'r= aw) (progn (setq rawfile t))) (warn-maybe-out-of-memory (file-attribute-siz= e attributes)))) (if buf (let (nonexistent) (or nowarn (verify-visited-file= -modtime buf) (cond ((not ...) (setq nonexistent t) (message "File %s = no longer exists!" filename)) ((and ... ...) (save-current-buffer ... = ... ... ...)) ((not query-about-changed-file) (message ... ... ...)) ((yes-= or-no-p ...) (save-current-buffer ... ...)))) (save-current-buffer (set-buf= fer buf) (let ((read-only ...)) (if (or nonexistent ... ...) nil (if ... ..= .)) (setq buffer-file-read-only read-only)) (if (or (eq ... ...) nonexisten= t (memq major-mode ...)) nil (if (buffer-modified-p) (if ... ... ...) (if .= .. ... ...)))) buf) (setq buf (create-file-buffer filename)) (find-file-nos= elect-1 buf filename nowarn rawfile truename number))))
=C2=A0 (if (file= -directory-p filename) (or (and find-file-run-dired (run-hook-with-args-unt= il-success 'find-directory-functions (if find-file-visit-truename (abbr= eviate-file-name (file-truename filename)) filename))) (error "%s is a= directory" filename)) (if (and wildcards find-file-wildcards (not (fi= le-name-quoted-p filename)) (string-match "[[*?]" filename)) (let= ((files (condition-case nil (file-expand-wildcards filename t) (error (lis= t filename)))) (find-file-wildcards nil)) (if (null files) (find-file-nosel= ect filename) (mapcar #'find-file-noselect files))) (let* ((buf (get-fi= le-buffer filename)) (truename (abbreviate-file-name (file-truename filenam= e))) (attributes (file-attributes truename)) (number (nthcdr 10 attributes)= ) (other (and (not buf) (find-buffer-visiting filename #'...)))) (if ot= her (progn (or nowarn find-file-suppress-same-file-warnings (string-equal f= ilename (buffer-file-name other)) (files--message "%s and %s are the s= ame file" filename (buffer-file-name other))) (if (or find-file-existi= ng-other-name find-file-visit-truename) (setq buf other)))) (if (not (or bu= f nowarn)) (progn (if (eq (abort-if-file-too-large ... "open" fil= ename ...) 'raw) (progn (setq rawfile t))) (warn-maybe-out-of-memory (f= ile-attribute-size attributes)))) (if buf (let (nonexistent) (or nowarn (ve= rify-visited-file-modtime buf) (cond (... ... ...) (... ...) (... ...) (...= ...))) (save-current-buffer (set-buffer buf) (let (...) (if ... nil ...) (= setq buffer-file-read-only read-only)) (if (or ... nonexistent ...) nil (if= ... ... ...))) buf) (setq buf (create-file-buffer filename)) (find-file-no= select-1 buf filename nowarn rawfile truename number)))))
=C2=A0 find-fi= le-noselect("/tmp/bug.org" nil nil= t)
=C2=A0 (let ((value (find-file-noselect filename nil nil wildcards))= ) (if (listp value) (mapcar 'pop-to-buffer-same-window (nreverse value)= ) (pop-to-buffer-same-window value)))
=C2=A0 find-file("/tmp/bug.org" t)
=C2=A0 funcall-interactively(f= ind-file "/tmp/bug.org" t)
=C2= =A0 command-execute(find-file)
=C2=A0
--000000000000dff76b05e9311080-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 11:49:07 2022 Received: (at 57972) by debbugs.gnu.org; 21 Sep 2022 15:49:07 +0000 Received: from localhost ([127.0.0.1]:35073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob1yF-0005fR-6m for submit@debbugs.gnu.org; Wed, 21 Sep 2022 11:49:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ob1yD-0005ev-QJ for 57972@debbugs.gnu.org; Wed, 21 Sep 2022 11:49:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob1y8-0005eo-GK; Wed, 21 Sep 2022 11:49:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ubYwy+bunYXZgReEbz7LUfDJ64+vox4qlQEhQTIYMww=; b=eomProg6Z/Iw LIr6suHGEj2hClIb5kTiKdCXCxQ9QjoF2TbyxDO9VCM5jhJaC7e94Pupo6P17UngrzjmF85xMo5/y tTzSvAYuymyUDGvtUlztmqpHnFpYdbWTEsxvJ4Hs1kK+SKMwdT8dEjTbBMAswBMm+2pmDfzLIcEVE S+up92crhRfvCqkT1MfjVng3cNA4KwYYIpwzIKZFmYsVzerVPHFe6584b/wRlNPh/AIDgOWBq+jEF Q4Q5tpwqK6LXhhGz/ki/uwQzbIFhchxnxfj4adDfA4TrxXoQ1hQN6d/pySJOrzV3L8hWcEgETkdVL L/3QuL3BFGKZhL+vyD9zzA==; Received: from [87.69.77.57] (port=3132 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob1y7-0000TR-UX; Wed, 21 Sep 2022 11:49:00 -0400 Date: Wed, 21 Sep 2022 18:49:08 +0300 Message-Id: <83v8pgu3rf.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: (message from Ihor Radchenko on Wed, 21 Sep 2022 22:51:16 +0800) Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Wed, 21 Sep 2022 22:51:16 +0800 > Cc: 57972@debbugs.gnu.org > > And another thing: do you have any clue (or maybe more than a clue) > what changes in Org wrt what's on the Emacs master branch could have > caused this? If you do, can you show those changes, or point to the > specific places in Org files where those changes can be eye-balled? > > I bisected Org repo and found the first bad commit. Unfortunately, it is not very useful. > > The commit changed the order function calls in org-mode. Before the commit, > `org-setup-filling' got called prior to `org-element-cache-reset' and > `org-setup-filling' has an explicit (require 'org-element) statement, which > made autoloading unnecessary in the past. OK, that explains the problem, I think. > I can generate an alternative backtrace using debug-on-entry org-mode. > The debug buffer right before error is below Thanks. However, even before I look deeper into the backtrace, it sounds like the problem looks us right in our face. The snippet from org.el I posted earlier, i.e. (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? From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 22 22:09:51 2022 Received: (at 57972) by debbugs.gnu.org; 23 Sep 2022 02:09:51 +0000 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 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 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) 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) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body In-Reply-To: <83v8pgu3rf.fsf@gnu.org> 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> Date: Fri, 23 Sep 2022 10:10:32 +0800 Message-ID: <871qs2alif.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 23 03:14:29 2022 Received: (at 57972-done) by debbugs.gnu.org; 23 Sep 2022 07:14:29 +0000 Received: from localhost ([127.0.0.1]:39243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obct4-0002O1-8A for submit@debbugs.gnu.org; Fri, 23 Sep 2022 03:14:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obct0-0002Na-8f for 57972-done@debbugs.gnu.org; Fri, 23 Sep 2022 03:14:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obcsu-0006iU-5H; Fri, 23 Sep 2022 03:14:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MrcTi0DvERkjY2Z3hmeRaqFYKEAb8et5EQsqjCuBLf0=; b=P3mSVZTVtt8o 6LUjRufA2fcR+vp+sFJtXGNWi1oeFd3Im4xqvUyk21NkTyQZWyuL4nGP4xSsV6DCgJ6TbGNifwnvY iLD3dqwcwv2nuMzv6f3mRCe5zKv9yBKmN6Zg58RTiqu9kZPwU9BrJhWrSzUv5qp0djv5BK563yMaD GUQ8pr7uJq3K0RP8YqP6OzOssryVCUeLL8h+Rs0m80dfI0XWEom48ZGm0xtb8HfkcbdXrdHkUwNEo oZo1SOgxopCvES2GkuNfOroh+/wNQh70dZ/l0iWkcHuQ52K98ykInXWvjZONqOsiytBjps9Rr++Sm 6HDbxIcyZPEfLu3fPRoNvQ==; Received: from [87.69.77.57] (port=1182 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obcst-0007ka-F8; Fri, 23 Sep 2022 03:14:03 -0400 Date: Fri, 23 Sep 2022 10:14:17 +0300 Message-Id: <838rmar29i.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko , Stefan Monnier In-Reply-To: <871qs2alif.fsf@localhost> (message from Ihor Radchenko on Fri, 23 Sep 2022 10:10:32 +0800) Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972-done Cc: 57972-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Ihor Radchenko > Cc: 57972@debbugs.gnu.org > Date: Fri, 23 Sep 2022 10:10:32 +0800 > > 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). Thanks, so I'm closing this bug. > 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. Lars, Stefan: am I missing something? From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 23 17:14:02 2022 Received: (at 57972-done) by debbugs.gnu.org; 23 Sep 2022 21:14:03 +0000 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 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 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) 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== 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) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body In-Reply-To: <838rmar29i.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 23 Sep 2022 10:14:17 +0300") 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> Date: Fri, 23 Sep 2022 17:13:50 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.072 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972-done Cc: 57972-done@debbugs.gnu.org, Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 22:43:56 2022 Received: (at 57972) by debbugs.gnu.org; 25 Sep 2022 02:43:56 +0000 Received: from localhost ([127.0.0.1]:45608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocHca-0002fn-9s for submit@debbugs.gnu.org; Sat, 24 Sep 2022 22:43:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocHcY-0002fY-NQ for 57972@debbugs.gnu.org; Sat, 24 Sep 2022 22:43:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocHcT-0001xD-Cb; Sat, 24 Sep 2022 22:43:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=94srYhGa6b12qEr8MCBsgYFguLIMstEqArALoOSSc7I=; b=nUa+4ON3xztNDjEhhn9C g0iYs99/GZK8R79Kx2B6zmQiODO8PNQYerPztS0Oopwyom2zC+1XmK1c920gT4ypgkheaRwsVbF8y qwugcAtKAjiHnb8pZBZy9Lcmnd6h7dUS+uEqYrjaEhD9QA/GM5Wb3VKagfflQrOTxmGGwtOacUGkJ 7IgOqqMxtfz1eQAWxQk/kmRFKqVtUEYDBiwEbhFX+1jflfmmvAhQCSx80n3IMuUKE3jwCJbNStCOg V8A4IqDuiU4bfWliF7KsJnggr018FLyog4FJVgb5m3JC8tCsWGlFFJ+5yfT5xSloWcH1IBxcjH4Fd tQ91Fk6Q1KIREQ==; Received: from 96.52.140.77.rev.sfr.net ([77.140.52.96]:51496 helo=hal) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocHcS-000629-Qa; Sat, 24 Sep 2022 22:43:49 -0400 Received: by hal (Postfix, from userid 1000) id 353561E0409; Sun, 25 Sep 2022 04:43:47 +0200 (CEST) From: Bastien To: Eli Zaretskii Subject: Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body In-Reply-To: <83v8pgu3rf.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 21 Sep 2022 18:49:08 +0300") Organization: GNU 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Date: Sun, 25 Sep 2022 04:43:47 +0200 Message-ID: <87fsggdvh8.fsf@bzg.fr> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57972 Cc: 57972@debbugs.gnu.org, Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > (or (eq this-command 'eval-buffer) <<<<<<<<<<<<<<<<<<<<< > > explicitly avoids loading org-loaddefs.el if org.el was loaded via > eval-buffer. I think this was the reason for this line, yes. If it is causing problem, let's remove it. -- Bastien From unknown Sun Aug 17 09:10:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Oct 2022 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator