Delay enabling desktop-save-mode' until after Org' is ready

This commit is contained in:
Gerard Vermeulen 2024-02-01 16:20:04 +01:00
parent 3733b67a52
commit c5979fb175

View File

@ -384,29 +384,6 @@ recommendation of [[info:emacs#Saving Customizations][saving customizations (inf
nil nil nil 'generate-full))))
#+end_src
* [[info:emacs#Saving Emacs Sessions][Saving Emacs sessions (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:desktop
:END:
Listing [[lst:desktop-setup][setup desktop]] makes Emacs save its state between closing its session to
opening the next session.
#+caption[Setup ~desktop~ to save Emacs sessions]:
#+caption: Setup ~desktop~ to save Emacs sessions.
#+name: lst:desktop-setup
#+begin_src emacs-lisp -n :results silent
(desktop-save-mode t)
(setopt desktop-buffers-not-to-save
(rx bos (or "*Apropos" "compilation*"))
desktop-modes-not-to-save
'(emacs-lisp-mode image-mode tags-table-mode))
#+end_src
BUG: I fail to code a function to set the ~desktop-buffers-not-to-save-function~
option.
* [[info:emacs#Package Installation][Install the selected packages (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:install-selected-packages
@ -4732,6 +4709,31 @@ it for this buffer is by typing {{{kbd(C-c C-e t U)}}} to export the it to a
(global-set-key (kbd "C-c g") #'writegood-mode))
#+end_src
* [[info:emacs#Saving Emacs Sessions][Saving Emacs sessions (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:desktop
:END:
Listing [[lst:desktop-setup][setup desktop]] makes Emacs save its state between closing its session to
opening the next session.
#+caption[Setup ~desktop~ to save Emacs sessions]:
#+caption: Setup ~desktop~ to save Emacs sessions.
#+name: lst:desktop-setup
#+begin_src emacs-lisp -n :results silent
(with-eval-after-load 'emacs
;; Load and configure `Org' before enabling `desktop-save-mode'.
(desktop-save-mode t)
(setopt desktop-buffers-not-to-save
(rx bos (or "*Apropos" "compilation*"))
desktop-modes-not-to-save
'(emacs-lisp-mode image-mode tags-table-mode)))
#+end_src
BUG: I fail to code a function to set the ~desktop-buffers-not-to-save-function~
option.
* Programming Tools
:PROPERTIES:
:CUSTOM_ID: sec:programming-tools