setq custom-file "~/.emacs.d/custom.el")(
I almost always want Emacs's
running. There's no reason not to, especially when I am using
EXWM. The ability to be able to attach to Emacs
to edit files from the command line, or to rescue a broken X11 session,
or to do batch operations using Emacs's text-processing libraries are
all super powerful, and it makes little sense to not use this.
unless (boundp 'server-process) ( (server-start))
Desktop Save Mode is the session management system for Emacs; it holds state of open buffers and session variables across instantiation of Emacs, which is super useful in mobile setups like laptops which reboot a lot. To make startup sane, I'm choosing to eagerly restore the 10 most recently used buffers on startup, and then in Idle the system will restore the remaining buffers.
1) (desktop-save-mode setq desktop-restore-eager 25) (setq desktop-load-locked-desktop t) (setq desktop-files-not-to-save "\\(^/[^/:]*:\\|(ftp)$\\|KILL\\)") (setq desktop-restore-frames nil) (setq desktop-lazy-verbose nil)(
Emacs should automatically save my state, and does so every five minutes.
defun cce/desktop-save () ("Write the desktop save file to ~/.emacs.d" (desktop-save user-emacs-directory))if (not (boundp 'cce/desktop-save-timer)) (setq cce/desktop-save-timer (300 t 'cce/desktop-save))) (run-with-idle-timer
The splashscreen is useful if you've never used Emacs before, but I'd rather just drop straight in to the Scratch buffer.
setq inhibit-splash-screen t)(
savehist mode simply persists the state of a
bunch of user-input fields, allowing history of minibuffer input, my
kill ring, etc. This is a simple quality of life fix.
require 'savehist) (setq savehist-file (concat user-emacs-directory "savehist")) (setq savehist-save-minibuffer-history 1) (setq savehist-additional-variables ( '(kill-ring search-ring regexp-search-ring))1)(savehist-mode
recentf gives me a "Recent Files" menu
and also some pretty neat Projectile integration.
consult-recentf in my Consult configuration benefits from this
ibuffer instead of
list-buffers; someday I'd like to move this to
"C-x C-b") 'ibuffer) (global-set-key (kbd "ibuffer" (with-eval-after-load 'ibuffer-hook #'ibuffer-set-filter-groups-by-mode)) (add-to-list