Closed RaghuNaik closed 4 weeks ago
I have noticed on my system that every time Org-related packages are updated, I get an "Org version mismatch" warning, i.e. the built-in Org version (9.6.15 for me) is loaded during the update and used for byte-compilation. When loading the byte-compiled packages with Org 9.7 later this can cause errors.
So we should probably ensure that the correct Org version is loaded when updating packages.
Could you try recompiling or reinstalling all Org-related packages (or just those that were updated) while Spacemacs is running with org-version
>= 9.7?
Since org has moved into emacs itself its becoming more and more critical to update the org version we want to use. I think if we updating org we need to make sure that this package is updated first and afterwards all org related features are unloaded and then loaded again to make sure we get the new version and not the build in one not even partially.
Ok with this being said here is a workaround:
(spacemacs/recompile-elpa t)
and let spacemacs recompile all elpa packages for you, beware this may take a while.I will put this into my project planning.
@RaghuNaik can you try one of the two workarounds and report back? If it does not work I would like to know which package is malfunctioning and would require a stack trace.
I have noticed on my system that every time Org-related packages are updated, I get an "Org version mismatch" warning, i.e. the built-in Org version (9.6.15 for me) is loaded during the update and used for byte-compilation.
I spent some time bisecting package updates, and this actually seems to only be the case when a package contains Org macros or functions but does not explicitly depend on Org.
I can reproduce the "Org version mismatch" warning for example by (using the compleseus layer) uninstalling consult and restarting, which will install consult again but seems to load the built-in Org version during byte-compilation. So perhaps we can do something like setting the load-path for Org before installing packages on startup.
Since org has moved into emacs itself its becoming more and more critical to update the org version we want to use. I think if we updating org we need to make sure that this package is updated first and afterwards all org related features are unloaded and then loaded again to make sure we get the new version and not the build in one not even partially.
Ok with this being said here is a workaround:
* Either go into elpa/version/ and search for all packages with org in the name, except org mode itself and remove them then restart emacs. This should load the updated org version and then byte compile all related packages accordingly. * Alternatively you can run `(spacemacs/recompile-elpa t)` and let spacemacs recompile all elpa packages for you, beware this may take a while.
I will put this into my project planning.
@RaghuNaik can you try one of the two workarounds and report back? If it does not work I would like to know which package is malfunctioning and would require a stack trace.
Tried the first option. It did not work. Same issues as highlighted earlier.
Going to try the second option.
Cheers.
Tried to recompile the packages withSPC f e c
.
Get the following compile log:
Leaving directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/’
Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/multi-vterm-20221031.610/multi-vterm.el at Sat Sep 14 08:48:30 2024
Entering directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/multi-vterm-20221031.610/’
multi-vterm.el:34:2: Error: Cannot open load file: No such file or directory, vterm-module
Leaving directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/multi-vterm-20221031.610/’
Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/noctilux-theme-20161113.1442/noctilux-theme.el at Sat Sep 14 08:48:31 2024
Entering directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/noctilux-theme-20161113.1442/’
In noctilux-color-definitions:
noctilux-theme.el:125:29: Warning: ‘case’ is an obsolete alias (as of 27.1);
use ‘cl-case’ instead.
noctilux-theme.el:157:19: Warning: ‘rotatef’ is an obsolete alias (as of
27.1); use ‘cl-rotatef’ instead.
noctilux-theme.el:274:17: Warning: ‘case’ is an obsolete alias (as of 27.1);
use ‘cl-case’ instead.
noctilux-theme.el:690:2: Error: Symbol’s function definition is void: noctilux-color-definitions
Leaving directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/noctilux-theme-20161113.1442/’
Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/org-ref-helm.el at Sat Sep 14 08:48:32 2024
Entering directory ‘/home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/’
org-ref-helm.el:33:2: Error: Cannot open load file: No such file or directory, helm-bibtex
Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/org-ref-ivy.el at Sat Sep 14 08:48:33 2024
org-ref-ivy.el:33:2: Error: Cannot open load file: No such file or directory, ivy-bibtex
Compiling file /home/XXX/.emacs.d/elpa/29.3/develop/org-ref-20240802.1213/org-ref-pdf.el at Sat Sep 14 08:48:33 2024
org-ref-pdf.el:35:2: Error: Cannot open load file: No such file or directory, pdf-tools
The log seems okay to me. Do the errors still occur?
Error during redisplay: (jit-lock-function 1) signaled (error "Selecting deleted buffer")
To obtain a backtrace for such an error with toggle-debug-on-error
you can enable jit-lock-debug-mode
I think.
If the error occurs only on startup you can try starting from the command line with emacs --debug-init
and putting
(jit-lock-debug-mode 1)
(setq debug-on-error t)
into your dotspacemacs/user-init
function.
Here is what I tried.
After recompiling, emacs starts with the file mode specification error: (error selecting deleted buffer)
error and freezes.
I kill emacs and start it again.
No error message from the get go.
I enable Jit-Lock-Debug mode
and open an org file. I get the file mode specification error: (error selecting deleted buffer)
error.
I close the org file and enable 'toggle-debug-on-error' and then open the org file again.
I get the following backtrace log:
`
Debugger entered--Lisp error: (error "Selecting deleted buffer")
org-element--substring((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil #
apply(#
If the error occurs only on startup you can try starting from the command line with
emacs --debug-init
and putting(jit-lock-debug-mode 1) (setq debug-on-error t)
into your
dotspacemacs/user-init
function.
Also tried as you suggested.
I get the following error
Error during redisplay: (jit-lock-function 1) signaled (error "Selecting deleted buffer")
.
Bactrace log:
`Debugger entered--Lisp error: (error "Selecting deleted buffer")
org-element--substring((src-block (:standard-properties [4 4 nil nil 86 1 nil planning element t nil nil nil nil #
apply(#
Thanks, the error seems to come from xenops-mode
, so it might be an upstream problem. I can try to reproduce it later.
I can reproduce the problem by enabling xenops-mode
in an Org buffer with source blocks. I don't actually use xenops-mode
myself, so it is difficult for me to test, but the following attempted fix at least gets rid of the error for me:
(defun fn/xenops-src-parse-at-point ()
(-if-let* ((element (xenops-parse-element-at-point 'src))
(org-babel-info
(xenops-src-do-in-org-mode
(org-babel-get-src-block-info 'light (org-element-context)))))
(xenops-util-plist-update
element
:type 'src
:language (nth 0 org-babel-info)
:org-babel-info org-babel-info)))
(advice-add 'xenops-src-parse-at-point :override 'fn/xenops-src-parse-at-point)
@RaghuNaik I think this should be reported upstream.
Ok thank you @fnussbaum and @smile13241324. I will close this issue and follow it upstream.
Much appreciated. I learnt a lot in this process.
I am getting this error after a package update.
File mode specification error: (error Selecting deleted buffer)
Error during redisplay: (jit-lock-function 1) signaled (error "Selecting deleted buffer")
Now emacs freezes on start-up and I have to kill the process and start it up again. Org fontification is gone and cdlatex commands are not working now.
Not sure if anyone else is also experiencing this.
Would appreciate any help.
My system details are as below: `
System Info :computer:
`