Skip to content
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

Discussion: Move customized settings to custom.el #6090

Closed
wants to merge 1 commit into from

Conversation

punassuming
Copy link
Contributor

@punassuming punassuming commented May 19, 2016

As discussed in #5751, proposes to move customized settings in a file within the /.cache directory. One thing missing in this PR is some indication that the current mess at the bottom of the dotspacemacs file can be deleted by the user.

@punassuming punassuming changed the title Move customized settings to custom.el Discussion: Move customized settings to custom.el May 19, 2016
@syl20bnr
Copy link
Owner

I have to think about it. If someone can give a summary of the cons of the current method I would gladly appreciate it.
One thing I like about the current method of having everything in the dotfile is that it makes it simpler for things like the Nix package manager to install spacemacs but I'm far to be an expert with this package manager (cc @travisbhartwell and @CestDiego). OTOH we support also spacemacs.d directory and with this method having a custom.el is easy.
Maybe we should create a ˜/.spacemacs-custom.el ? It would be only custom.el in spacemacs.d. spacemacs-custom.el maybe confusing though, we could name it .emacs-custom.el but then people may believe it is an Emacs standard thing...

@punassuming
Copy link
Contributor Author

punassuming commented Jun 23, 2016

@syl20bnr, for the most part, spacemacs doesn't make use the customization system, so another benefit would be that we specify when the custom file is loaded in the spacemacs.

@punassuming
Copy link
Contributor Author

@syl20bnr, one con I have found in the current method, is that some packages make use of defcustom to define variables as functions, in these cases they sometimes are incompatible with defer loading. org-trello is one example. One benefit of controlling the time of loading the custom settings is that the user can incorporate fixes in either user-init and user-config depending on the need. In the current setup, I don't think either functions are run prior to the evaluation of custom settings.

@syl20bnr
Copy link
Owner

@nixmaniack indeed this would be great to control when to load the settings (I guess we would load them between user-init and user-config). But we cannot put the custom file in .cache because it may contain real configuration as important as the config in .spacemacs.

I thought about a crazy thing à la @JAremko ;-) we could wrap them in a defun at the bottom of the .spacemacs file. The trick would be to have a smart and clean enough function to wrap them on the fly before actually load the file. Opening it in a temp buffer and using sexp navigation and search functions should do the trick cleanly. For the name of the function I propose dotspacemacs/emacs-custom-settings.

@punassuming
Copy link
Contributor Author

@syl20bnr, does the latest custom settings changes invalidate this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants