I load modus-themes (among other packages) in my Emacs configuration using:
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile (require 'use-package))
(require 'use-package-ensure)
(setq use-package-always-ensure t)
(use-package modus-themes
:init
;; Add all your customizations prior to loading the themes
(setq modus-themes-slanted-constructs t
modus-themes-bold-constructs t
modus-themes-mode-line nil
modus-themes-region '(bg-only no-extend))
;; Load the theme files before enabling a theme (else you get an error).
(modus-themes-load-themes)
:config
;; Load the theme of your choice:
(modus-themes-load-vivendi))
I upgrade all my packages occasionally by running list-packages
then hitting U
and x
. When I start Emacs next I find that the modus-themes-load-vivendi theme is note active and *Messages*
contains:
Error (use-package): modus-themes/:init: Symbol’s function definition is void: modus-themes--standard-completions
Error (use-package): modus-themes/:config: Symbol’s function definition is void: modus-themes--standard-completions
Error (use-package): theme-changer/:config: Symbol’s function definition is void: modus-themes--standard-completions
(although I have historically had other errors too.) The only way I've found to fix these errors is to delete the elpa/modus-themes-*
directory so that use-package
downloads it again.
I believe that I've seen similar problems with magit, but I no longer have the error messages to prove it.
I've not found anyone else reporting similar problems, so I can only assume that what I'm seeing must be due to something in my configuration, but I don't know where to start looking. The only clue I have is that the .el files for the latest version of modus-themes no longer contains modus-themes--standard-completions
yet the byte-compiled .elc files do contain mentions of it despite the timestamps being the same:
europa:~/config/emacs.d/elpa/modus-themes-20220313.1121> ls -l
total 1396
-rw-r--r-- 1 mac mac 683 Mar 13 15:38 dir
-rw-r--r-- 1 mac mac 25108 Mar 13 15:38 doclicense.info
-rw-r--r-- 1 mac mac 2722 Mar 13 15:38 modus-operandi-theme.el
-rw-r--r-- 1 mac mac 190614 Mar 13 15:38 modus-operandi-theme.elc
-rw-r--r-- 1 mac mac 2849 Mar 13 15:38 modus-themes-autoloads.el
-rw-r--r-- 1 mac mac 388919 Mar 13 15:38 modus-themes.el
-rw-r--r-- 1 mac mac 326345 Mar 13 15:38 modus-themes.elc
-rw-r--r-- 1 mac mac 277662 Mar 13 15:38 modus-themes.info
-rw-r--r-- 1 mac mac 457 Mar 13 15:38 modus-themes-pkg.el
-rw-r--r-- 1 mac mac 2716 Mar 13 15:38 modus-vivendi-theme.el
-rw-r--r-- 1 mac mac 190611 Mar 13 15:38 modus-vivendi-theme.elc
europa:~/config/emacs.d/elpa/modus-themes-20220313.1121> grep -l modus-themes--standard-completion *
modus-operandi-theme.elc
modus-vivendi-theme.elc
Any ideas gratefully appreciated.