Avoid customization conflicts between Customize and use-package

To this end, do not use :custom in use-package declaration, because
according to the documentation[1], `:custom` declarations can conflict
with settings done via `customize-option`.  However, values set directly
in the configuration files should always be allowed to be overwritten by
custom settings done by the user – at least that's the general approach
of this Emacs configuration.

[1]: https://www.gnu.org/software/emacs/manual/html_mono/use-package.html#User-options
This commit is contained in:
Daniel Borchmann 2025-03-08 09:10:57 +01:00
parent f2f98c3ac5
commit 9132364fb7
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625

64
init.el
View File

@ -256,12 +256,12 @@
:init (setq multisession-directory (expand-file-name "multisession/" emacs-d-userdata)))
(use-package proced
:custom ((proced-tree-flag t)
(proced-auto-update-flag (not on-windows))
(proced-format 'medium)
(proced-auto-update-interval 1)
(proced-goal-attribute nil)
(proced-enable-color-flag t)))
:init (setq proced-tree-flag t
proced-auto-update-flag (not on-windows)
proced-format 'medium
proced-auto-update-interval 1
proced-goal-attribute nil
proced-enable-color-flag t))
(use-package project
:init (setq project-list-file (expand-file-name "projects" emacs-d-userdata))
@ -1347,17 +1347,24 @@ accordingly."
(slot . 0)
(window-width . 0.33)
(window-parameters . ((no-other-window . t)
(no-delete-other-windows . t))))))
(no-delete-other-windows . t)))))
(setq org-roam-directory (expand-file-name "~/Documents/zettelkasten/")
org-roam-db-location (expand-file-name "~/Documents/zettelkasten/org-roam.db")
org-roam-completion-everywhere t
org-roam-mode-sections (list #'org-roam-backlinks-section
#'org-roam-reflinks-section
#'org-roam-unlinked-references-section)))
:commands (org-roam-node-insert
org-roam-node-find
org-roam-capture
org-roam-buffer-toggle)
:custom ((org-roam-directory (expand-file-name "~/Documents/zettelkasten/"))
(org-roam-db-location (expand-file-name "~/Documents/zettelkasten/org-roam.db"))
(org-roam-completion-everywhere t)
(org-roam-mode-sections (list #'org-roam-backlinks-section
#'org-roam-reflinks-section
#'org-roam-unlinked-references-section)))
:autoload (org-roam-backlinks-section
org-roam-reflinks-section
org-roam-unlinked-references-section)
:config (progn
(org-roam-db-autosync-mode)
@ -1466,28 +1473,27 @@ Note that this workaround is incomplete, as explained in this comment."
magit-commit-show-diff nil
magit-repository-directories '(("~/" . 0)
("~/.emacs.d" . 0)
("~/Documents/" . 3)))
("~/Documents/" . 3))
magit-repolist-columns '(("Name" 20 magit-repolist-column-ident
())
("S" 1 magit-repolist-column-flag
())
("B<U" 3 magit-repolist-column-unpulled-from-upstream
((:right-align t)
(:sort <)))
("B>U" 3 magit-repolist-column-unpushed-to-upstream
((:right-align t)
(:sort <)))
("Version" 35 magit-repolist-column-version
((:sort magit-repolist-version<)))
("Path" 99 magit-repolist-column-path
())))
(when on-windows
;; Experimental: on Windows, do not refresh magit-status-buffers
;; that are not selected, to increase performance.
(setq magit-refresh-status-buffer nil)))
:custom ((magit-repolist-columns '(("Name" 20 magit-repolist-column-ident
())
("S" 1 magit-repolist-column-flag
())
("B<U" 3 magit-repolist-column-unpulled-from-upstream
((:right-align t)
(:sort <)))
("B>U" 3 magit-repolist-column-unpushed-to-upstream
((:right-align t)
(:sort <)))
("Version" 35 magit-repolist-column-version
((:sort magit-repolist-version<)))
("Path" 99 magit-repolist-column-path
()))))
:config (progn
(when (fboundp 'global-magit-file-mode)
(global-magit-file-mode -1))