Closed mandarvaze closed 1 year ago
Strange!
You can try to enter your ~/.emacs.d/
, cleanup installed packages and launch Emacs again.
Run:
cd ~/.emacs.d
make clean
emacs
Or you can try to run Emacs with --debug-init
to see what is causing the problem.
@abougouffa First option didn't help (It reinstalled a whole lot of things and at the end same error)
Got the following from --debug-init
(Hopefully it helps)
Debugger entered--Lisp error: (error "Unable to find theme file for ‘use-package’")
error("Unable to find theme file for `%s'" use-package)
#<subr load-theme>(use-package t nil)
apply(#<subr load-theme> (use-package t))
load-theme(use-package t)
(progn (load-theme (or minemacs-theme 'doom-one-light) t) t)
(condition-case err (progn (load-theme (or minemacs-theme 'doom-one-light) t) t) ((debug error) (funcall use-package--warning1 :config err)))
(prog1 (condition-case err (progn (load-theme (or minemacs-theme 'doom-one-light) t) t) ((debug error) (funcall use-package--warning1 :config err))) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Configuring package doom-themes" elapsed) (message "%s...done" "Configuring package doom-themes"))))
(let ((now (current-time))) (message "%s..." "Configuring package doom-themes") (prog1 (condition-case err (progn (load-theme (or minemacs-theme 'doom-one-light) t) t) ((debug error) (funcall use-package--warning1 :config err))) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Configuring package doom-themes" elapsed) (message "%s...done" "Configuring package doom-themes")))))
(if (not (require 'doom-themes nil t)) (display-warning 'use-package (format "Cannot load %s" 'doom-themes) :error) (let ((now (current-time))) (message "%s..." "Configuring package doom-themes") (prog1 (condition-case err (progn (load-theme (or minemacs-theme 'doom-one-light) t) t) ((debug error) (funcall use-package--warning1 :config err))) (let ((elapsed (float-time (time-subtract ... now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Configuring package doom-themes" elapsed) (message "%s...done" "Configuring package doom-themes"))))))
(prog1 (if (not (require 'doom-themes nil t)) (display-warning 'use-package (format "Cannot load %s" 'doom-themes) :error) (let ((now (current-time))) (message "%s..." "Configuring package doom-themes") (prog1 (condition-case err (progn (load-theme (or minemacs-theme ...) t) t) ((debug error) (funcall use-package--warning1 :config err))) (let ((elapsed (float-time ...))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Configuring package doom-themes" elapsed) (message "%s...done" "Configuring package doom-themes")))))) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package doom-themes" elapsed) (message "%s...done" "Loading package doom-themes"))))
(let ((now (current-time))) (message "%s..." "Loading package doom-themes") (prog1 (if (not (require 'doom-themes nil t)) (display-warning 'use-package (format "Cannot load %s" 'doom-themes) :error) (let ((now (current-time))) (message "%s..." "Configuring package doom-themes") (prog1 (condition-case err (progn (load-theme ... t) t) ((debug error) (funcall use-package--warning1 :config err))) (let ((elapsed ...)) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Configuring package doom-themes" elapsed) (message "%s...done" "Configuring package doom-themes")))))) (let ((elapsed (float-time (time-subtract (current-time) now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package doom-themes" elapsed) (message "%s...done" "Loading package doom-themes")))))
(condition-case err (let ((now (current-time))) (message "%s..." "Loading package doom-themes") (prog1 (if (not (require 'doom-themes nil t)) (display-warning 'use-package (format "Cannot load %s" 'doom-themes) :error) (let ((now (current-time))) (message "%s..." "Configuring package doom-themes") (prog1 (condition-case err (progn ... t) (... ...)) (let (...) (if ... ... ...))))) (let ((elapsed (float-time (time-subtract ... now)))) (if (> elapsed 0.1) (message "%s...done (%.3fs)" "Loading package doom-themes" elapsed) (message "%s...done" "Loading package doom-themes"))))) ((debug error) (funcall use-package--warning1 :catch err)))
load-with-code-conversion("/Users/mandar/.emacs.d/core/me-core-ui.el" "/Users/mandar/.emacs.d/core/me-core-ui.el" nil nil)
load("~/.emacs.d/core/me-core-ui.el" nil nil)
(if (file-exists-p filename) (load filename nil (not minemacs-verbose)) (let ((inhibit-message t)) (apply #'message (list (concat "[MinEmacs:Error] " "Core module \"%s\" not found!") module))))
(let ((filename (concat minemacs-core-dir (format "%s.el" module)))) (if (file-exists-p filename) (load filename nil (not minemacs-verbose)) (let ((inhibit-message t)) (apply #'message (list (concat "[MinEmacs:Error] " "Core module \"%s\" not found!") module)))))
(let ((module (car tail))) (apply #'message (list (concat "[MinEmacs:Log] " "Loading core module \"%s\"") module)) (let ((filename (concat minemacs-core-dir (format "%s.el" module)))) (if (file-exists-p filename) (load filename nil (not minemacs-verbose)) (let ((inhibit-message t)) (apply #'message (list (concat "[MinEmacs:Error] " "Core module \"%s\" not found!") module))))) (setq tail (cdr tail)))
(while tail (let ((module (car tail))) (apply #'message (list (concat "[MinEmacs:Log] " "Loading core module \"%s\"") module)) (let ((filename (concat minemacs-core-dir (format "%s.el" module)))) (if (file-exists-p filename) (load filename nil (not minemacs-verbose)) (let ((inhibit-message t)) (apply #'message (list (concat "[MinEmacs:Error] " "Core module \"%s\" not found!") module))))) (setq tail (cdr tail))))
(let ((tail minemacs-core-modules)) (while tail (let ((module (car tail))) (apply #'message (list (concat "[MinEmacs:Log] " "Loading core module \"%s\"") module)) (let ((filename (concat minemacs-core-dir (format "%s.el" module)))) (if (file-exists-p filename) (load filename nil (not minemacs-verbose)) (let ((inhibit-message t)) (apply #'message (list ... module))))) (setq tail (cdr tail)))))
load-with-code-conversion("/Users/mandar/.emacs.d/init.el" "/Users/mandar/.emacs.d/init.el" t t)
load("/Users/mandar/.emacs.d/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode 0x155e4b3bac66f5>) #f(compiled-function () #<bytecode -0x1f3c61addc0da035>) t)
command-line()
normal-top-level()
I love this configuration - it's basically all the best of Doom, with none of the overhead and complexity. Thank you !
I am experiencing the same error & have been able to semi workaround it, mainly by accepting that I'll get the error above. It seems to be a problem loading the doom-themes package & the order when it's loaded. Loading the doom-themes package & calling the theme at the end loads everything without the error.
Hello @mandarvaze ,
Thank you for the feedback, I'm trying to reproduce the error on a VM, but without success.
Can you please specify which OS and Emacs version you are using?
Hi @jonathanwilner ,
Happy to hear that!
Can you please specify which OS and Emacs version you are using?, I'm trying to reproduce the error.
In the meanwhile, can you test the last commit?
Hi @abougouffa - I tried the new commit and got the same result. :-(
I'm using MacOS 13.2 & Emacs 30 :
GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.2.0, NS appkit-2299.30
Version 13.1 (Build 22C65)) of 2023-01-09
Thank you for the feedback @jonathanwilner ,
Unfortunately, I don't have access to a Mac, so I can't test this!
From what you've described, it seems that the problem occurs when loading doom-themes
early.
Please try the fix_doom_themes
branch.
The fix_doom_themes branch fixed the problem! Thank you !
Thank you for testing it, I will merge it into the main branch.
Some additional context :
minemacs-theme
back in my config.el - @abougouffa is this mandatory ?make clean && emacs
: Not sure if this was related to missing minemacs-theme
earlier.Now things are working.
BTW, now that I'm using minemacs at night, I get dark theme automatically ❤️
@mandarvaze Great!
Yep, after this issue, I refactored the me-core-ui
module to defer loading the theme. This eliminates the problem you were getting!
For the minemacs-theme
, it is not mandatory, if you don't specify a theme name, MinEmacs will use the default theme doom-one-light
. So for example, if you want a dark theme, you can set it to doom-one
(the dark variant).
So if you used minemacs-theme
from the skel/config.el
template, you will get dark theme doom-one
, I don't think it loads day/night themes automatically, however if you want such a functionality, it can be easily implemented (a timer to switch to dark/light theme at a given time).
Yeah, your explanation makes sense.
Earlier because of the error, I was getting doom-one-light
the default one which is all-white.
Once the issue was resolved, I now have doom-one
(I copied skel/config.el
to create my own) which is dark.
No magic 😞
I'm getting :
I have removed this from my
config.el
(thinking it was causing the problem) but didn't help