Suppose I did some customization through M-x customize-mode or something similar

   '(("n" "Agenda and all TODOs"
      ((agenda "" nil)
       (alltodo "" nil))
     ("i" "Urgent things" tags "URGENT" nil)))

they are inserted inside (custom-set-variables

Can I just cut the lines and put them inside

(use-package org ?

Actually do I need to? I thought it would be aethetically pleasing to see well cleaned up init.el file..

2 Answers 2


I thought it would be aethetically pleasing to see well cleaned up init.el file

Yes, and in my case I don't use the customize UI at all, all my config is out of the custom-set-variables region. custom-set-variables only contains assignments written by the packages I use.

If your custom-set-variables region is still in your init file, you may want to move it to another file, copying from my config copied from Purcell's config:

(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(unless (file-exists-p custom-file)
  (write-region "" nil custom-file))
(when (file-exists-p custom-file)
  (load custom-file))

One thing to note is that custom-set-variables can trigger the custom set behavior written by the package author, while setq cannot. Such behavior is defined in :set when using defcustom (read the doc of defcustom for more). use-package's :custom, obviously does trigger that, as its name states.


It's a matter of preference (or aesthetics) but if you are making frequent changes you'll appreciate having all the settings in one place. Using use-package can be helpful for keeping similar configs together and being explicit about how keyconfigs, hooks and dependencies (etc) are related to a package.

If you change something with the customize interface, you can just move it into your init.el file as needed.

With use-package you could try something like...

 (use-package org
  :config (setq org-agenda-custom-commands ... 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.