doomemacs / themes

A megapack of themes for GNU Emacs.
MIT License
2.17k stars 397 forks source link

Can't install custom themes on packages.el #843

Closed hrqmonteiro closed 2 weeks ago

hrqmonteiro commented 2 weeks ago

Theme(s)

No response

What were you expecting?

Trying installing Everforest theme

I just put this on packages.el:

(package! everforest
  :recipe (:repo "https://git.sr.ht/~theorytoe/everforest-theme"))

(use-package! 'everforest')

(load-theme 'everforest-hard-dark t)

And it gives me errors:

* 0.101578:*:cli:run!: doom sync -B -e
* 0.101715:*:cli:context-parse: found command (doom)
* 0.102093:*:cli:load: autoload /home/hrq/.config/emacs/lisp/cli/sync.el
* 0.102177:*:cli:load: ~/.config/emacs/lisp/cli/sync.el nil
* 0.102446:*:cli:load: ~/.config/emacs/lisp/cli/packages nil
* 0.111864:*:cli:context-parse: found command (doom sync)
* 0.112288:*:cli:context-parse: found switch "-B"
* 0.112658:*:cli:context-parse: found switch "-e"
* 0.113061:*:cli:context-execute: doom sync
* 0.113470:*:cli:execute: (:before) ((input) (context . #s(doom-cli-context (26396 60584 609057 945000) 15265 0 (161 . 24) nil nil doom nil nil (doom sync) nil (sync -B -e) ((--aot) (-B . -B) (--rebuild) (-b) (--jobs) (-j) (--gc) (-U) (-u) (-e . -e) (--eval) (-E) (--strict-load) (--load) (-L) (--color) (--benchmark) (--profile) (--pager) (--emacsdir) (--doomdir) (--verbose) (-v) (--debug) (-D) (--force) (-!)) ((t) ((doom sync) -B -e) ((doom) sync -B -e))  *doom-cli stdin*  *doom-cli stdout*  *doom-cli stderr* nil)) (_) (evals) (loads) (color?) (bench?) (profile) (pager) (emacsdir) (doomdir) (verbose?) (debug?) (force?))
* 0.113556:*:cli:execute: (doom sync) ((context . #s(doom-cli-context (26396 60584 609057 945000) 15265 0 (161 . 24) nil nil doom nil nil (doom sync) nil (sync -B -e) ((--aot) (-B . -B) (--rebuild) (-b) (--jobs) (-j) (--gc) (-U) (-u) (-e . -e) (--eval) (-E) (--strict-load) (--load) (-L) (--color) (--benchmark) (--profile) (--pager) (--emacsdir) (--doomdir) (--verbose) (-v) (--debug) (-D) (--force) (-!)) ((t) ((doom sync) -B -e) ((doom) sync -B -e))  *doom-cli stdin*  *doom-cli stdout*  *doom-cli stderr* nil)) (aot?) (nobuild? . -B) (rebuild?) (jobs) (purge?) (noupdate?) (update?) (noenvvar? . -e))
* 0.113779:*:cli:call: (doom sync) -> (doom profiles sync --reload)
* 0.113920:*:cli:context-parse: found command (doom)
* 0.114216:*:cli:load: autoload /home/hrq/.config/emacs/lisp/cli/profiles.el
* 0.114279:*:cli:load: ~/.config/emacs/lisp/cli/profiles.el nil
* 0.119230:*:cli:context-parse: found command (doom profiles)
* 0.119643:*:cli:context-parse: found command (doom profiles sync)
* 0.120003:*:cli:context-parse: found switch "--reload"
* 0.120450:*:cli:context-execute: doom profiles sync
* 0.120846:*:cli:execute: (:before) ((input) (context . #s(doom-cli-context (26396 60584 609057 945000) 15265 0 (161 . 24) nil nil doom nil nil (doom profiles sync) nil (sync -B -e) ((--reload . --reload) (--aot) (-B . -B) (--rebuild) (-b) (--jobs) (-j) (--gc) (-U) (-u) (-e . -e) (--eval) (-E) (--strict-load) (--load) (-L) (--color) (--benchmark) (--profile) (--pager) (--emacsdir) (--doomdir) (--verbose) (-v) (--debug) (-D) (--force) (-!)) ((t) ((doom profiles sync) --reload) ((doom profiles) sync --reload) ((doom) profiles sync --reload))  *doom-cli stdin*  *doom-cli stdout*  *doom-cli stderr* nil)) (_) (evals) (loads) (color?) (bench?) (profile) (pager) (emacsdir) (doomdir) (verbose?) (debug?) (force?))
* 0.120996:*:cli:execute: (doom profiles sync) ((reload? . --reload))
  * 0.121481:*:cli:Profiles are up-to-date!
- Using Emacs 29.4 @ /usr/bin/emacs
> Synchronizing "default" profile...
  * 0.122605:*:cli:Initializing straight
  * 0.122680::context: +packages (cli t)
  * 0.122725::context:module: =[0 -110 -110 :core nil nil nil]
  * 0.161457:*:cli:Initializing recipes
  * 0.165338:*:cli:Installing core packages
  * 0.165645:*:cli:Initializing package.el
  * 0.195514:*:cli:Initializing straight.el
  * 0.195813::context: +packages (cli t)
  * 0.195881::context:module: =[1 105 -105 :user nil nil nil]
  * 0.196563::context:module: =[2 -111 -111 :config use-package nil nil]
  * 0.197190::context:module: =[0 -110 -110 :core nil nil nil]
  * 0.202444::context:module: =[1 105 -105 :user nil nil nil]
  * 0.203195::context:module: =[3 0 0 :completion corfu (+orderless) nil]
  * 0.205024::context:module: =[4 0 0 :completion vertico nil nil]
  * 0.209002::context:module: =[5 0 0 :ui doom nil nil]
  * 0.210005::context:module: =[6 0 0 :ui doom-dashboard nil nil]
  * 0.210112::context:module: =[7 0 0 :ui doom-quit nil nil]
  * 0.210179::context:module: =[8 0 0 :ui hl-todo nil nil]
  * 0.210779::context:module: =[9 0 0 :ui ligatures nil nil]
  * 0.211417::context:module: =[10 0 0 :ui modeline nil nil]
  * 0.212673::context:module: =[11 0 0 :ui neotree nil nil]
  * 0.213269::context:module: =[12 0 0 :ui ophints nil nil]
  * 0.214083::context:module: =[13 0 0 :ui popup (+defaults) nil]
  * 0.214154::context:module: =[14 0 0 :ui vc-gutter (+pretty) nil]
  * 0.214688::context:module: =[15 0 0 :ui workspaces nil nil]
  * 0.215252::context:module: =[16 0 0 :editor evil (+everywhere) nil]
  * 0.221726::context:module: =[17 0 0 :editor file-templates nil nil]
  * 0.222352::context:module: =[18 0 0 :editor fold nil nil]
  * 0.224035::context:module: =[19 0 0 :editor format (+onsave) nil]
  * 0.224660::context:module: =[20 0 0 :editor multiple-cursors nil nil]
  * 0.225734::context:module: =[21 0 0 :editor parinfer nil nil]
  * 0.226356::context:module: =[22 0 0 :editor snippets nil nil]
  * 0.227628::context:module: =[23 0 0 :emacs dired nil nil]
  * 0.228649::context:module: =[24 0 0 :emacs electric nil nil]
  * 0.228733::context:module: =[25 0 0 :emacs ibuffer nil nil]
  * 0.229649::context:module: =[26 0 0 :emacs undo nil nil]
  * 0.231037::context:module: =[27 0 0 :emacs vc nil nil]
  * 0.233226::context:module: =[28 0 0 :term vterm nil nil]
  * 0.234555::context:module: =[29 0 0 :checkers syntax nil nil]
  * 0.235804::context:module: =[30 0 0 :tools docker nil nil]
  * 0.237063::context:module: =[31 0 0 :tools editorconfig nil nil]
  * 0.237669::context:module: =[32 0 0 :tools eval (+overlay) nil]
  * 0.238587::context:module: =[33 0 0 :tools lookup nil nil]
  * 0.241504::context:module: =[34 0 0 :tools lsp nil nil]
  * 0.243677::context:module: =[35 0 0 :tools magit nil nil]
  * 0.244742::context:module: =[36 0 0 :tools tree-sitter nil nil]
  * 0.246447::context:module: =[37 0 0 :lang cc (+lsp) nil]
  * 0.249555::context:module: =[38 0 0 :lang clojure nil nil]
  * 0.252770::context:module: =[39 0 0 :lang dart (+flutter) nil]
  * 0.254369::context:module: =[40 0 0 :lang emacs-lisp nil nil]
  * 0.258051::context:module: =[41 0 0 :lang go (+lsp) nil]
  * 0.260555::context:module: =[42 0 0 :lang graphql (+lsp) nil]
  * 0.261777::context:module: =[43 0 0 :lang json nil nil]
  * 0.262900::context:module: =[44 0 0 :lang java (+lsp) nil]
  * 0.265057::context:module: =[45 0 0 :lang kotlin nil nil]
  * 0.265999::context:module: =[46 0 0 :lang lua nil nil]
  * 0.267280::context:module: =[47 0 0 :lang markdown nil nil]
  * 0.269040::context:module: =[48 0 0 :lang org (+pretty) nil]
  * 0.280375::context:module: =[49 0 0 :lang python nil nil]
  * 0.284480::context:module: =[50 0 0 :lang rust (+lsp) nil]
  * 0.285370::context:module: =[51 0 0 :lang scheme (+guile) nil]
  * 0.288620::context:module: =[52 0 0 :lang sh nil nil]
  * 0.289461::context:module: =[53 0 0 :config default (+bindings +smartparens) nil]
  * 0.290809::context:module: =[1 105 -105 :user nil nil nil]
  > Ensuring packages are installed and built...
    * 0.530620:*:cli:hook:eldoc-mode-hook: run eldoc-mode-set-explicitly
    > Building everforest...
      INFO     Scraping files for loaddefs... 
    * 0.824099:*:cli:hook:after-change-major-mode-hook: run global-eldoc-mode-enable-in-buffers
    * 0.824199:*:cli:hook:eldoc-mode-hook: run eldoc-mode-set-explicitly
    * 0.827189:*:cli:hook:after-change-major-mode-hook: run global-eldoc-mode-enable-in-buffers
    * 0.827292:*:cli:hook:eldoc-mode-hook: run eldoc-mode-set-explicitly
    * 0.830004:*:cli:hook:after-change-major-mode-hook: run global-eldoc-mode-enable-in-buffers
    * 0.830085:*:cli:hook:eldoc-mode-hook: run eldoc-mode-set-explicitly
    x There was an unexpected runtime error
      Message: Error with packages
      Details: ("everforest" (end-of-file "/home/hrq/.config/emacs/bin/doom"))
      Backtrace:
        (signal doom-package-error ("everforest" (end-of-file "/home/hrq/.config/emacs/bin/doom")))
        (condition-case e (let ((straight-vc-git-post-clone-hook (cons #'(lambda (&rest --cl-rest--) "\n\n(fn &key COMMIT &allow-other-keys)" (let* ((commit ...
        (let ((repo-dir (straight--repos-dir (or local-repo package))) (build-dir (straight--build-dir package))) (if force-p nil (let* ((build (if (plist-me...
        (let* ((--cl-rest-- (append (list :recipe recipe) recipe)) (package (car (cdr (
plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-me...
        (cl-destructuring-bind (&key package local-repo recipe &allow-other-keys) (append (list :recipe recipe) recipe) (let ((repo-dir (straight--repos-dir ...
        (straight--with-plist (append (list :recipe recipe) recipe) (package local-repo recipe) (let ((repo-dir (straight--repos-dir (or local-repo package))...
        (let ((recipe (car tail))) (straight--with-plist (append (list :recipe recipe) recipe) (package local-repo recipe) (let ((repo-dir (straight--repos-d...
        (while tail (let ((recipe (car tail))) (straight--with-plist (append (list :recipe recipe) recipe) (package local-repo recipe) (let ((repo-dir (strai...
        (let ((tail recipes)) (while tail (let ((recipe (car tail))) (straight--with-plist (append (list :recipe recipe) recipe) (package local-repo recipe) ...
        (let* ((recipes recipes) (built nil) (straight-use-package-pre-build-functions (cons #'(lambda (pkg &rest _) (setq built (if (member pkg built) built...
        (and t (let* ((recipes recipes) (built nil) (straight-use-package-pre-build-functions (cons #'(lambda (pkg &rest _) (setq built (if (member pkg built...
        (let* ((built (and t (let* ((recipes recipes) (built nil) (straight-use-package-pre-build-functions (cons #'(lambda (pkg &rest _) (setq built (if (me...
GNU Emacs     v29.4            nil
Doom core     v3.0.0-pre       grafted, HEAD -> master, origin/master, origin/HEAD 8b9168d 2024-10-03 02:26:28 -0400
Doom modules  v24.11.0-pre     grafted, HEAD -> master, origin/master, origin/HEAD 8b9168d 2024-10-03 02:26:28 -0400
      ! Wrote extended backtrace to ~/.config/emacs/.local/state/logs/cli.doom.241026102040.15265.error
* 2.546343:*:cli:Finished (GCs: 2, elapsed: 0.274194s)
✓ Finished in 2.54641s

What actually happened?

Wrote above

Steps to reproduce

Just write that on packages.el and reload doom config

Operating system

Nobara 40

Emacs version

GNU Emacs 29.4

Installed commit of doom-themes

latest

hlissner commented 2 weeks ago

The end-of-file error is caused by the fact that everforest.el has a hanging ;;;###autoload cookie with everything under it commented out, so Emacs' autoload scanner fails to find anything to autoload, thus throwing an error. This should be fixed upstream.

You can get around it in Doom by simply omitting the everforest.el file (since there's nothing useful in it anyway), but then you must avoid trying to loading it (as you would've with (use-package! everforest ...)). E.g.

;;; in $DOOMDIR/packages.el
(package! everforest
  :recipe (:repo "https://git.sr.ht/~theorytoe/everforest-theme"
           :files ("*.el" (:exclude "everforest.el"))))

;;; in $DOOMDIR/config.el
(load-theme 'everforest-hard-dark t)

Side note: you said you put use-package! and load-theme call in your $DOOMDIR/packages.el? Don't do this. They don't belong there and will cause errors. They belong in $DOOMDIR/config.el.

In any case, this is not a Doom or doomemacs/themes issue, so I'll close this.