Sort list of known projects before persisting

This is to avoid commit clutter when tracking `project-list-file` in Git.
This commit is contained in:
Daniel Borchmann 2025-01-19 09:53:41 +01:00
parent 3a6d2005cb
commit 0d001c7b39
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625

11
init.el
View File

@ -264,7 +264,16 @@
(proced-enable-color-flag t)))
(use-package project
:init (setq project-list-file (expand-file-name "projects" emacs-d-userdata)))
:init (setq project-list-file (expand-file-name "projects" emacs-d-userdata))
:config (progn
;; Sort known projects before persisting, to reduce committer noise
(define-advice project--write-project-list (:before
()
sort-before-writing)
(setq project--list (cl-sort project--list
#'string<
:key #'cl-first)))))
(use-package quail
:init (setq default-input-method "TeX")