[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57972: closed (29.0.50; Autoloaded function raises (void-function or
From: |
GNU bug Tracking System |
Subject: |
bug#57972: closed (29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body) |
Date: |
Fri, 23 Sep 2022 07:15:02 +0000 |
Your message dated Fri, 23 Sep 2022 10:14:17 +0300
with message-id <838rmar29i.fsf@gnu.org>
and subject line Re: bug#57972: 29.0.50; Autoloaded function raises
(void-function org-element-cache-reset) when called within major-mode body
has caused the debbugs.gnu.org bug report #57972,
regarding 29.0.50; Autoloaded function raises (void-function
org-element-cache-reset) when called within major-mode body
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)
--
57972: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57972
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message ---
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 |
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.
>
> 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)
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
--
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
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#57972: 29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body |
Date: |
Fri, 23 Sep 2022 10:14:17 +0300 |
> From: Ihor Radchenko <yantar92@gmail.com>
> Cc: 57972@debbugs.gnu.org
> Date: Fri, 23 Sep 2022 10:10:32 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > (or (eq this-command 'eval-buffer) <<<<<<<<<<<<<<<<<<<<<
> > (condition-case nil
> > (load (concat (file-name-directory load-file-name)
> > "org-loaddefs")
> > nil t nil t)
> > (error
> > (message "WARNING: No org-loaddefs.el file could be found from where
> > org.el is loaded.")
> > (sit-for 3)
> > (message "You need to run \"make\" or \"make autoloads\" from Org lisp
> > directory")
> > (sit-for 3))))
> >
> > explicitly avoids loading org-loaddefs.el if org.el was loaded via
> > eval-buffer. Which is exactly the case here, isn't it, and explains
> > why the loaddefs aren't loaded?
> >
> > So now the question becomes: why does org.el treat eval-buffer in this
> > special way? Perhaps because of byte-compilation or something?
>
> I have no clue. I will ask Bastien (he authored this piece of code).
>
> I hence see this Emacs bug report as resolved (it is not an Emacs bug).
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?
--- End Message ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#57972: closed (29.0.50; Autoloaded function raises (void-function org-element-cache-reset) when called within major-mode body),
GNU bug Tracking System <=