[-- Attachment #1: Type: text/plain, Size: 1049 bytes --] Hmmm ... While trying to investigate one bug I have run into another odd one: * emacs version: GNU Emacs 29.0.50 (build 23, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.12) of 2022-09-20 * org version: Org mode version 9.5.5 (release_9.5.5-804-gf1a197 @ /home/dortmann/src/git-org-mode/lisp/) 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) 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 The result is the failure message above. :-/ [-- Attachment #2: Type: text/html, Size: 1674 bytes --]
Daniel Ortmann <daniel.ortmann@oracle.com> writes: > 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) Confirmed. I know how to "fix" this (can just add require 'org-element into `org-mode'), but I do not fully understand what is going on on Emacs side. Let's see what Emacs devs say. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57972 -- 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
Was Eli Z's observation the key? Of code not autoloading when
eval-buffer is running?
On 9/21/22 03:37, Ihor Radchenko wrote:
> Daniel Ortmann <daniel.ortmann@oracle.com> writes:
>
>> 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)
> Confirmed.
> I know how to "fix" this (can just add require 'org-element into
> `org-mode'), but I do not fully understand what is going on on Emacs
> side.
>
> Let's see what Emacs devs say.
> See https://urldefense.com/v3/__https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57972__;!!ACWV5N9M2RV99hQ!I8yBQdVtvdB9WZzgR3JRtDsvGImyGOhqd8fkT_pXuN02wF5lk8ftp-3v1HiF-T3Rn-eyiQIr2BhjbxqK_bo$
>
Daniel Ortmann <daniel.ortmann@oracle.com> writes: > Was Eli Z's observation the key? Of code not autoloading when > eval-buffer is running? Yes, it is. Bastien, In f36b19eef, you introduced the following code into org.el: (or (eq this-command 'eval-buffer) (condition-case nil (load (concat (file-name-directory load-file-name) "org-loaddefs.el") nil t t 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)))) The commit message explains why we display warning, but it is unclear why (eq this-command ...) check is performed. This check is causing the issue herein. Also, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57972 I am leaning towards removing `this-command' check, unless there are important reasons to keep it. -- 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
Ihor Radchenko <yantar92@gmail.com> writes:
> I am leaning towards removing `this-command' check, unless there are
> important reasons to keep it.
Yes, please go ahead.
--
Bastien
Bastien Guerry <bzg@gnu.org> writes: > Ihor Radchenko <yantar92@gmail.com> writes: > >> I am leaning towards removing `this-command' check, unless there are >> important reasons to keep it. > > Yes, please go ahead. Done. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3b0c4ad20794ecfb6557900897179718cc812786 -- 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