Fixing side effects of org version mismatch hotfix

Fixes #15887
This commit is contained in:
Maxi Wolff 2023-01-18 06:30:08 +01:00
parent 7e8524086c
commit d08822c614
2 changed files with 8 additions and 6 deletions

View file

@ -1553,9 +1553,10 @@ can be adjusted with the variable:
(force-mode-line-update) (force-mode-line-update)
(spacemacs-buffer/goto-link-line))) (spacemacs-buffer/goto-link-line)))
(defun spacemacs-buffer/goto-buffer (&optional refresh) (defun spacemacs-buffer/goto-buffer (&optional refresh do-not-switch)
"Create the special buffer for `spacemacs-buffer-mode' and switch to it. "Create the special buffer for `spacemacs-buffer-mode'.
REFRESH if the buffer should be redrawn. REFRESH if the buffer should be redrawn. This will automatically
switch to the buffer unless DO-NOT-SWITCH is non nil.
If a prefix argument is given, switch to it in an other, possibly new window." If a prefix argument is given, switch to it in an other, possibly new window."
(interactive) (interactive)
@ -1597,8 +1598,9 @@ If a prefix argument is given, switch to it in an other, possibly new window."
(forward-line (1- save-line)) (forward-line (1- save-line))
(forward-to-indentation 0)) (forward-to-indentation 0))
(spacemacs-buffer/goto-link-line))) (spacemacs-buffer/goto-link-line)))
(if current-prefix-arg (unless do-not-switch
(switch-to-buffer-other-window spacemacs-buffer-name) (if current-prefix-arg
(switch-to-buffer-other-window spacemacs-buffer-name))
(switch-to-buffer spacemacs-buffer-name)) (switch-to-buffer spacemacs-buffer-name))
(spacemacs//redisplay)))) (spacemacs//redisplay))))

View file

@ -263,7 +263,7 @@ Note: the hooked function is not executed when in dumped mode."
;; Redraw the spacemacs buffer with full org support ;; Redraw the spacemacs buffer with full org support
;; Before it must be drawn without org related features to ;; Before it must be drawn without org related features to
;; avoid loading build in org in emacs >= 29 ;; avoid loading build in org in emacs >= 29
(spacemacs-buffer/goto-buffer t))) (spacemacs-buffer/goto-buffer t t)))
(if dotspacemacs-byte-compile (if dotspacemacs-byte-compile
(when (> 1 (spacemacs//dir-byte-compile-state (when (> 1 (spacemacs//dir-byte-compile-state