In addition to what @AndrewSwann said -
There is a difference between customizations in the sense of custom-set-variables
and custom-set-faces
, on the one hand, and using isolated sexps such as (set-frame-height (selected-frame) 36)
in your init file, on the other hand.
The former are designed to work with the Customize interface, and they are pretty solid. The latter depend on the state that is current when they are evaluated, and you are on your own wrt managing and keeping track of such state.
In particular, if you use something like (set-frame-height (selected-frame) 36)
at top level in your init file then it is up to you to ensure that the frame you want to modify is the one that is selected when that sexp is evaluated. Typically you would instead customize an option such as default-frame-alist
, or you would at least make sure of the frame you are operating on.
Sexp order always matters, including in your init file (and including the position of custom-set-variables
etc.), but the more you depend on the order the more you need to take it into account and manage it.
In general, you are better off following the conventional practices. If you want to do something beyond what Customize offers, then define mode or other functions that do exactly what you want, and invoke those from your init file. IOW, encapsulate your fiddling a bit, to ensure that the context is correct.
(In addition to recommending that you do as much as you can using Customize, I would also recommend that you separate what it does from your init file, by taking advantage of variable custom-file
.)