1

I started using the graphical interface for emacs again after a bit. and I've run into some problems. On boot the theme I'm using Calmer-forest is not getting loaded. However the rest of my .emacs file is getting loaded just fine. (For example I have it set to automatically go maximized on boot, and that is working fine. Along with my repositories.)

When I checked the Messages buffer I got this message:

Failed to enable theme: calmer-forest

Also if I go to my .emacs file, and I M-x eval-buffer the theme loads just fine and dandy.

I already checked this question, and I tried the adjustments listed in the answers. And they did not fix the problem, on boot my emacs frame was still in the white stock theme.

Let me know if any additional details are needed. I would like to make note, that this is not a huge problem but more of an annoyance.

Finally I'll attach my .emacs

; Initialize preferences 
(tool-bar-mode -1)
(add-to-list 'default-frame-alist '(fullscreen . maximized))
(setq inhibit-startup-message t)

; Package repositories
(require 'package) ;; You might already have this line
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
; Custom Packages 
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(add-to-list 'load-path "~/.emacs.d/lisp")
(add-to-list 'load-path "~/.emacs.d/lisp/ESS/lisp/")
(add-to-list 'load-path "~/.emacs.d/lisp/python-django/")
(add-to-list 'load-path "~/.emacs.d/emms/lisp/")
(require 'ess-site)
(require 'python-django)
(require 'emms-setup)
(emms-standard)
(emms-default-players)
;; Set your lisp system and, optionally, some contribs
                    ;Custom Variables
(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.
 '(custom-enabled-themes (quote (calmer-forest)))
 '(custom-safe-themes
   (quote
    ("7997e0765add4bfcdecb5ac3ee7f64bbb03018fb1ac5597c64ccca8c88b1262f" default)))
 '(org-babel-load-languages
   (quote
    ((emacs-lisp . t)
     (R . t)
     (lisp . t)
     (ditaa . t)
     (python . t)
     (css . t)
     (sh . t)
     (ruby . t)
     (js . t))))
 '(org-babel-python-command "python3"))
(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.
 )

(setq tramp-default-method "ssh")
2

If you installed this theme as a package: Packages are initialized after .emacs is read. To use/configure them from there, use constructions like

(add-hook 'after-init-hook (lambda () (load-theme 'calmer-forest)))

and analog to have the commands run after the initialization procedure. Or force the package init inside .emacs via

(package-initialize)
(load-theme 'calmer-forest)

The first solution might be more in line with how the startup process is designed, but it should not make a real difference.

  • Alrighty cool, any idea as to why the built in themes wouldn't work either? – Nalisarc Nov 25 '16 at 22:01
1

Alright, so upon trying again. It seemed to be that I was missing this at the bottom of my init file.

(package-initialize) (load-theme 'what-ever-theme t)

This was part of this answer, but I'm not sure as to why my theme didn't load properly after working fine for so long. And I'll look into it further.

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.