I created a theme which I stored in ~/.emacs.d/themes/, added this directory to custom-theme-load-path, and put (load-theme "the-theme.el") in my init.el. Now restarting emacs, I get prompted whether really to load, and then whether to consider safe in future. I said yes to both and confirmed that the file's SHA256 sum was put into init.el. But: next time I restart emacs, I get asked again! What am I missing? Running 26.1.

  • 1
    Are you trying to load the theme before your customized variables (with the checksum) have been established in your init file? – phils Jan 6 '19 at 3:05
  • @phils, you're right. That part of the init was handled by custom, and I didn't consider that my init.el.org was loaded above. – Toothrot Jan 6 '19 at 9:39
  • Great. I've added that as an answer (on the assumption that it did fix the problem). – phils Jan 6 '19 at 22:26

Bearing in mind that the init file is an elisp program which is evaluated in sequence, you need to ensure that the call to load-theme happens after the customized variables have been evaluated; otherwise Emacs doesn't know (yet) that the theme is safe to load.

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.