reddit / emacs

Abbrevs not saved to file between session

randdis · 2022-06-30 10:22
Hello, I'm trying to setup abbrev-mode but it doesn't save the abbreviation I define to a file. When I hit `M-x edit-abbrevs` it shows a buffer with my edits but that buffer is not saved on the disk, when I write it on disk it is not read. i have the following in my init.el (setq abbrev-file-name "~/dots/.emacs.d/abbrev_defs" save-abbrevs 'silently) (add-hook 'text-mode-hook #'abbrev-mode) edit: actually it's different. the file define with `abbrev-file-name` is erased at startup I'm running emacs as a daemon.
franburstall · 2022-06-30 11:02
I do (add-hook 'kill-emacs-hook 'write-abbrev-file)
randdis · 2022-06-30 12:16
> (add-hook 'kill-emacs-hook 'write-abbrev-file) awesome, that made it work. Thanks a lot.