Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • modus-themes modus-themes
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Scheduled maintenance on the database layer will take place on 2022-07-02. We expect GitLab.com to be unavailable for up to 2 hours starting from 06:00 UTC. Kindly follow our status page for updates and read more in our blog post.

  • Protesilaos Stavrou
  • modus-themesmodus-themes
  • Issues
  • #286
Closed
Open
Created Feb 23, 2022 by USAMI Kenta@zonuexe

Suggestions for compatibility of modus-themes-completions

After updating modus-themes from MELPA to the following version, an error occurred when loading the theme.

Debugger entered--Lisp error: (wrong-type-argument listp moderate)
  alist-get(matches moderate)
  modus-themes--completion(matches "#251232" "#f78fe7" "#49366e" "#ff62d4")
  byte-code("\305\306!\203\34\0\10\203\34\0\307\10!\310\311\11\"\232\203\34\0\306\312\313\"\204 \0\314\312!\210\315\316\317\320#\210\321\322\316!\323\324\2\"\323\325\3\"..." [load-file-name data-directory modus-themes-diffs modus-themes-mixed-fonts modus-themes-org-blocks fboundp require-theme file-name-directory expand-file-name "themes/" modus-themes t require custom-declare-theme modus-vivendi modus-vivendi-theme "Accessible and customizable dark theme (WCAG AAA s..." ((class color) (min-colors 89)) modus-themes--palette alist-get bg-main fg-main bg-dim fg-dim bg-alt fg-alt bg-active fg-active bg-inactive fg-inactive bg-active-accent bg-special-cold bg-special-faint-cold fg-special-cold bg-special-mild bg-special-faint-mild fg-special-mild bg-special-warm bg-special-faint-warm fg-special-warm bg-special-calm bg-special-faint-calm fg-special-calm red red-alt red-alt-other red-faint red-alt-faint red-alt-other-faint green ...] 2860)
  load-theme(modus-vivendi t)
  modus-themes-load-vivendi()
  (progn (modus-themes-load-vivendi))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)

Although described as "IGNORED" in f3ff0bc0, it actually crashes and confuses the user.

All old values, such as 'opinionated' and 'moderate' ARE IGNORED.

Proposal

You can display a warning to the user and ignore the setting by replacing it as follows.

@@ -3813,7 +3813,12 @@ KEY is the key of a cons cell.  BG and FG are the main colors.
 BGINTENSE works with the main foreground.  FGINTENSE works on its
 own.  BGACCENT and BGACCENTINTENSE are colorful variants of the
 other backgrounds."
-  (let* ((var modus-themes-completions)
+  (let* ((var (if (listp modus-themes-completions)
+                  modus-themes-completions
+                (prog1 nil
+                  (warn "modus-themes-completions: %s is deprecated.\nThis setting will be ignored until it is replaced from symbol to alist.\nPlease see %s"
+                        modus-themes-completions
+                        "https://gitlab.com/protesilaos/modus-themes/-/commit/f3ff0bc0089051cea85e39700ec148c1a40aeba4"))))
          (properties (or (alist-get key var) (alist-get t var)))
          (popup (eq key 'popup))
          (selection (eq key 'selection))

This change was submitted in an issue rather than a Merge Request as I can't do good documentation. I do not claim copyright for this patch, so feel free to replace it.

Finally, I love modus-themes very much. Thank you!

Assignee
Assign to
Time tracking