3

I don't know whether it is because I started using org-mode but when I checked the .spacemacs file this is what I found:

;; Do not write anything past this comment. This is where Emacs will       
;; auto-generate custom variable definitions.                              
(custom-set-variables                                                      
 ;; custom-set-variables was added by Custom.                              
 ;; If you edit it by hand, you could mess it up, so be careful.           
 ;; Your init file should contain only one such instance.                  
 ;; If there is more than one, they won't work right.                      
 '(org-agenda-files (quote ("~/doc.org"))))
(custom-set-faces                                                          
 ;; custom-set-faces was added by Custom.                                  
 ;; If you edit it by hand, you could mess it up, so be careful.           
 ;; Your init file should contain only one such instance.                  
 ;; If there is more than one, they won't work right.                      
 )

I don't know what Custom is but on further research I find out that I can create a separate file and configure .spacemacs to read from it. eg

(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)

Where in .spacemacs should this part go? When copied into custom.el should they be copied directly as they are, ie into the top-level of the custom.el, or are they supposed to go into a function which will then be called from .spacemacs?

3

You should take the whole text of your first code snippet and stuff it into the custom.el file as it is.
After you have done this, put your second code snippet in place of the previously copied stuff (replacing the former copied text in file .spacemacs).

Thats it. Just try it. Emacs will complain if you did it wrong.

Custom is the customization function of emacs. You can change nearly every setting of emacs with it.
Call it with Menu -> Options -> Customize Emacs (and several other functions).

After you have done the modification, emacs will handle the custom.el file all by itself, no need to edit it directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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