mindre-theme icon indicating copy to clipboard operation
mindre-theme copied to clipboard

The `mindre' theme is obsolete since Emacs 0.1

Open jcowgar opened this issue 2 years ago • 1 comments

I am running emacs 30.0.50. My initialization of Mindre Theme is:

(elpaca mindre-theme
  :host 'github
  :repo "erikbackman/mindre-theme"
  (setq mindre-use-more-bold t
        mindre-use-faded-lisp-parens t)
  (load-theme 'mindre t))

When starting Emacs, I get the Warning: The `mindre' theme is obsolete since Emacs 0.1.

I see this line in code (make-obsolete 'mindre 'load-theme "0.1"), but not being a good Elisp programmer, I am unsure what I am doing right/wrong. The .el file installed does have a 0.1.5 Version header.

jcowgar avatar Nov 14 '23 16:11 jcowgar

@jcowgar :

Ok, the following is not a solution but a workaround. Add the following code to your config.el and the warning message will be gone:

;; Define an advice to prevent mindre from being marked as obsolete
(defadvice make-obsolete (around prevent-mindre-obsolete activate)
  "Prevent the mindre theme from being marked as obsolete."
  (unless (and (equal (ad-get-arg 0) 'mindre)  ; Check if it's mindre being made obsolete
               (equal (ad-get-arg 1) 'load-theme)  ; Check if it's load-theme function
               (string= (ad-get-arg 2) "0.1"))  ; Check if version is "0.1"
    ad-do-it))

;; Load the advice
(ad-activate 'make-obsolete)

This code basically uses the advice framework to prevent mindre from being marked as obsolete.

I hope this helps you and others, until @erikbackman (or anyone else) comes up with a true solution (I'm new to emacs and emacs Lisp, so I don't know what the true solution to this is).

Cheers!

gusgustavsohn avatar Jan 27 '24 21:01 gusgustavsohn

Created a pull request to fix this.

IamPyu avatar May 25 '24 19:05 IamPyu

If I remember correctly I was trying to signal that the mindre function was being deprecated in favour of just using load-theme for loading the theme.

Resolved with #17

erikbackman avatar Jun 10 '24 21:06 erikbackman