[core] Hotfix org version mismatch during startup
this is caused by the home buffer loading build-in org which conflicts with elpa org. We actually want to use elpa org exclusively so we have to make sure to redraw the spacemacs buffer only after we have finished loading the layers. In addition latest org version 9.6 and the behaviour on emacs 29 has also changed so that org is autoloaded much earlier than before. This is what actually did make this bug show up. However this behaviour was in place since a long time and could be the cause for a lot of unreproducible bugs as the actual conflicts are dependent on the distribution specific emacs version. Known issues: This is a hotfix it solves the original issue but introduces a new, hopefully less dangerous issue, this is for now the start buffer is not configurable. I will add a follow up PR to remove this issue however I think this is far less annoying than a set of random conflicts caused by loading elisp files from different org sources.
This commit is contained in:
parent
1100ee841a
commit
e71a68633b
|
@ -274,7 +274,6 @@ Returns height in units of line height with a minimum of 1."
|
|||
(spacemacs-buffer//do-insert-startupify-lists)
|
||||
(recentf-mode -1)
|
||||
(line-number-at-pos)))
|
||||
;; (count-lines (point-min) (point-max)))
|
||||
(setq dotspacemacs-startup-buffer-show-icons icons)
|
||||
lines))
|
||||
;; We determine the maximum available banner height by subtracting the
|
||||
|
@ -1377,7 +1376,8 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
|
|||
(defun spacemacs-buffer//do-insert-startupify-lists ()
|
||||
"Insert the startup lists in the current buffer."
|
||||
(setq spacemacs-buffer--startup-list-nr 1)
|
||||
(let ((dotspacemacs-startup-buffer-show-icons dotspacemacs-startup-buffer-show-icons))
|
||||
(let ((dotspacemacs-startup-buffer-show-icons dotspacemacs-startup-buffer-show-icons)
|
||||
(is-org-loaded (bound-and-true-p spacemacs-initialized)))
|
||||
(if (display-graphic-p)
|
||||
(unless (configuration-layer/package-used-p 'all-the-icons)
|
||||
(message "Package `all-the-icons' isn't installed")
|
||||
|
@ -1385,7 +1385,7 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
|
|||
(setq dotspacemacs-startup-buffer-show-icons nil))
|
||||
(when dotspacemacs-startup-buffer-show-icons
|
||||
(require 'all-the-icons))
|
||||
(dolist (els (append '(warnings) dotspacemacs-startup-lists))
|
||||
(dolist (els (if is-org-loaded (append '(warnings) dotspacemacs-startup-lists) '(warnings)))
|
||||
(let ((el (or (car-safe els) els))
|
||||
(list-size (or (cdr-safe els)
|
||||
spacemacs-buffer-startup-lists-length)))
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
(defvar spacemacs--default-mode-line mode-line-format
|
||||
"Backup of default mode line format.")
|
||||
|
||||
(defvar spacemacs-initialized nil
|
||||
"Whether or not spacemacs has finished initializing by completing
|
||||
the final step of executing code in `emacs-startup-hook'.")
|
||||
|
@ -157,17 +158,14 @@ the final step of executing code in `emacs-startup-hook'.")
|
|||
(car dotspacemacs-default-font)))))
|
||||
;; spacemacs init
|
||||
(setq inhibit-startup-screen t)
|
||||
(spacemacs-buffer/goto-buffer)
|
||||
(unless (display-graphic-p)
|
||||
;; explicitly recreate the home buffer for the first GUI client
|
||||
;; in order to correctly display the logo
|
||||
(spacemacs|do-after-display-system-init
|
||||
(kill-buffer (get-buffer spacemacs-buffer-name))
|
||||
(spacemacs-buffer/goto-buffer)))
|
||||
|
||||
;; Draw the spacemacs buffer without lists and scalling to avoid having
|
||||
;; to load build-in org which will conflict with elpa org
|
||||
(spacemacs-buffer/goto-buffer t)
|
||||
|
||||
;; This is set to nil during startup to allow Spacemacs to show buffers opened
|
||||
;; as command line arguments.
|
||||
(setq initial-buffer-choice nil)
|
||||
(setq inhibit-startup-screen t)
|
||||
(require 'core-keybindings)
|
||||
;; for convenience and user support
|
||||
(unless (fboundp 'tool-bar-mode)
|
||||
|
@ -261,13 +259,18 @@ Note: the hooked function is not executed when in dumped mode."
|
|||
(setq spacemacs-initialized t)
|
||||
(setq gc-cons-threshold (car dotspacemacs-gc-cons)
|
||||
gc-cons-percentage (cadr dotspacemacs-gc-cons))
|
||||
(setq read-process-output-max dotspacemacs-read-process-output-max)))
|
||||
(setq read-process-output-max dotspacemacs-read-process-output-max)
|
||||
;; Redraw the spacemacs buffer with full org support
|
||||
;; Before it must be drawn without org related features to
|
||||
;; avoid loading build in org in emacs >= 29
|
||||
(spacemacs-buffer/goto-buffer t)))
|
||||
|
||||
(if dotspacemacs-byte-compile
|
||||
(when (> 1 (spacemacs//dir-byte-compile-state
|
||||
(concat spacemacs-core-directory "libs/")))
|
||||
(byte-recompile-directory (concat spacemacs-core-directory "libs/") 0))
|
||||
(spacemacs//remove-byte-compiled-files-in-dir spacemacs-core-directory))
|
||||
|
||||
;; Check if revision has changed.
|
||||
(spacemacs//revision-check))
|
||||
|
||||
|
|
1
init.el
1
init.el
|
@ -26,6 +26,7 @@
|
|||
|
||||
;; Avoid garbage collection during startup.
|
||||
;; see `SPC h . dotspacemacs-gc-cons' for more info
|
||||
|
||||
(defconst emacs-start-time (current-time))
|
||||
(setq gc-cons-threshold 402653184 gc-cons-percentage 0.6)
|
||||
(load (concat (file-name-directory load-file-name) "core/core-load-paths")
|
||||
|
|
|
@ -93,7 +93,7 @@ For more extensive support of references through BibTeX files, have a look at
|
|||
the [[https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/bibtex/README.org][BibTeX layer]].
|
||||
|
||||
* Important Note
|
||||
Since version 0.300, spacemacs uses the =org= version from the ELPA repository
|
||||
Spacemacs uses the =org= version from the ELPA repository
|
||||
instead of the one shipped with emacs. Then, any =org= related code should not
|
||||
be loaded before =dotspacemacs/user-config=, otherwise both versions will be
|
||||
loaded and will conflict.
|
||||
|
|
Loading…
Reference in New Issue