Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable magit-file-icons failed. #6

Closed
JimMoen opened this issue Jun 26, 2024 · 1 comment · Fixed by #7
Closed

enable magit-file-icons failed. #6

JimMoen opened this issue Jun 26, 2024 · 1 comment · Fixed by #7

Comments

@JimMoen
Copy link

JimMoen commented Jun 26, 2024

ENV:
OS: Arch Linux (newest)
Emacs: archlinuxcn/emacs-native-comp-git
Emacs pkgs: Melpa newest. In particular, magit-20240625.2109, el-patch-20231123.2216, nerd-icons-20240524.311

Use the following configuration to enable magit-file-icons:

  (use-package magit-file-icons
    :ensure t
    :after (magit nerd-icons)
    :init
    (magit-file-icons-mode 1)
    :custom
    ;; These are the default values:
    (magit-file-icons-enable-diff-file-section-icons t)
    (magit-file-icons-enable-untracked-icons t)
    (magit-file-icons-enable-diffstat-icons t))

(Press C-x C-e after it)

Error msg logged:

Debugger entered--Lisp error: (user-error "Resolving ‘magit-insert-untracked-files’ template failed -- at least one template did not match any form in")
  user-error("Resolving `%s' template failed -- at least one template did not match any form in" magit-insert-untracked-files)
  el-patch--resolve-template(magit-insert-untracked-files defun)
  el-patch-eval-template(magit-insert-untracked-files defun)
  magit-file-icons-mode(1)
  (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil (list)) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(magit-file-icons-enable-diff-file-section-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-untracked-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-diffstat-icons t nil nil "Customized with use-package magit-file-icons"))) (magit-file-icons-mode 1) (require 'magit-file-icons nil nil))
  #f(lambda () [t] (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil (list)) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(magit-file-icons-enable-diff-file-section-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-untracked-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-diffstat-icons t nil nil "Customized with use-package magit-file-icons"))) (magit-file-icons-mode 1) (require 'magit-file-icons nil nil)))()
  eval-after-load(magit #f(lambda () [t] (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil (list)) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(magit-file-icons-enable-diff-file-section-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-untracked-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-diffstat-icons t nil nil "Customized with use-package magit-file-icons"))) (magit-file-icons-mode 1) (require 'magit-file-icons nil nil))))
  #f(lambda () [t] (eval-after-load 'magit #'(lambda nil (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil (list)) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(magit-file-icons-enable-diff-file-section-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-untracked-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-diffstat-icons t nil nil "Customized with use-package magit-file-icons"))) (magit-file-icons-mode 1) (require 'magit-file-icons nil nil)))))()
  eval-after-load(nerd-icons #f(lambda () [t] (eval-after-load 'magit #'(lambda nil (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil (list)) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(magit-file-icons-enable-diff-file-section-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-untracked-icons t nil nil "Customized with use-package magit-file-icons") '(magit-file-icons-enable-diffstat-icons t nil nil "Customized with use-package magit-file-icons"))) (magit-file-icons-mode 1) (require 'magit-file-icons nil nil))))))
  (progn (use-package-ensure-elpa 'magit-file-icons '(t) '(:demand t)) (eval-after-load 'nerd-icons #'(lambda nil (eval-after-load 'magit #'(lambda nil (progn ... ... ...))))))
  (progn (progn (use-package-ensure-elpa 'magit-file-icons '(t) '(:demand t)) (eval-after-load 'nerd-icons #'(lambda nil (eval-after-load 'magit #'(lambda nil ...))))))
  eval((progn (progn (use-package-ensure-elpa 'magit-file-icons '(t) '(:demand t)) (eval-after-load 'nerd-icons #'(lambda nil (eval-after-load 'magit #'...))))) t)
  elisp--eval-last-sexp(nil)
  #f(compiled-function () #<bytecode 0x8a29c757640a>)()
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)
@JimMoen JimMoen changed the title magit enable magit-file-icons failed. Jun 26, 2024
@gekoke gekoke linked a pull request Jun 27, 2024 that will close this issue
@gekoke
Copy link
Owner

gekoke commented Jun 27, 2024

Thanks for your report!

@gekoke gekoke closed this as completed in #7 Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants