Tweak the "Saving Emacs Sessions" section

This commit is contained in:
Gerard Vermeulen 2023-12-11 17:02:30 +01:00
parent dfcc3ccb5f
commit 83511c6b4e

View File

@ -377,30 +377,29 @@ 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:emacs#Saving Emacs Sessions][Saving Emacs sessions (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:desktop
:END:
The [[info:emacs#Saving Emacs Sessions][desktop]] library allows to save the state of Emacs from closing a session to
opening a session.
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
(desktop-save-mode t)
(setopt desktop-buffers-not-to-save
(rx bos (or " " "*Apropos*" "*compilation*"))
desktop-files-not-to-save
(rx (group
(or
;; Exclude the exclusions from desktop.el.
(seq bos "/" (zero-or-more (not (any "/:"))) ":")
(seq "(ftp)" eos)
;; Exclude all (hence, all ob-<lang>.el) Emacs Lisp files:
(seq ".el" eos)))))
(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