ement: move ement-save-sessions before after! block; pin sessions path

ement checks ement-save-sessions during its own init to register
kill-emacs-hook. Setting it inside after! was too late — the hook
wasn't added, so sessions were never saved on Emacs exit.

Also set ement-sessions-file explicitly to doom-private-dir to avoid
no-littering path redirection surprises.
This commit is contained in:
2026-02-23 13:43:52 +01:00
parent 95f80f9c44
commit d7f3c22a08

View File

@@ -861,10 +861,12 @@ Keeps the status bar and tab bar fully visible at any zoom level.")
;; SPC o M r — open room ;; SPC o M r — open room
;; SPC o M d — direct message ;; SPC o M d — direct message
(after! ement ;; Set BEFORE ement loads — ensures kill-emacs-hook saves sessions on exit.
;; Also pin sessions to a known path (no-littering may redirect otherwise).
(setq ement-save-sessions t
ement-sessions-file (expand-file-name "ement-sessions.el" doom-private-dir))
;; Persist session across restarts (saved token = no credentials on next start) (after! ement
(setq ement-save-sessions t)
;; Background auto-sync (internal — do NOT call ement-sync manually, causes issues) ;; Background auto-sync (internal — do NOT call ement-sync manually, causes issues)
(setq ement-auto-sync t) (setq ement-auto-sync t)