-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reliable loading of custom-file after load #7483
Conversation
(unless (bound-and-true-p custom-file) | ||
(setq custom-file (dotspacemacs/location))) | ||
(setq custom-file | ||
(concat (or dotspacemacs-directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use expand-file-name
here
Is there going to be any way to avoid |
I would like to avoid imposing a split by default for people using only the dotfile. People must be able to replicate a Spacemacs config simply by sharing the dotfile. Splitting part of the dotfile by default is a regression. OTHO I see no problem to use a different file for people using the dotdirectory. We should then restrict the split to only this case. For the dotfile case, I propose to make the split at runtime with some temp buffer magic. Actually once we have this, we could even avoid to split physically in the dotdirectory. Also, this way we keep the default Emacs behavior which put customize settings in init.el (which is the dotfile in our case). |
Mmhh I wonder if we could encapsulate empty customize sexps in a function. Maybe customize will detect them and keep them inside the function... |
I pushed a solution with commit e699f18 From the commit message:
|
I think we have now fixed the issue with the custom file so this PR is unnecessary. |
This lets people use customize to reliably override stuff, even variables that are set in Spacemacs. People who are already modifying the value of
custom-file
should see no change. People who are relying on customize in their dotfile should probably move them, but the existing forms should continue to work as well as they are now.Fixes: #5170
Obsoletes quite a few other PRs I expect.