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

ELPA version of nano-modeline is missing deps (nano-faces?) #148

Open
aschmitz-crnc opened this issue Jun 19, 2023 · 10 comments
Open

ELPA version of nano-modeline is missing deps (nano-faces?) #148

aschmitz-crnc opened this issue Jun 19, 2023 · 10 comments

Comments

@aschmitz-crnc
Copy link

Since recently I get error messages when starting up Emacs with nano-modeline enabled. I installed nano-modeline a long time back using ELPA. The error I get is:

Debugger entered--Lisp error: (error "Invalid face")
  internal-get-lisp-face-attribute(nil :foreground nil)
  face-attribute(nil :foreground nil nil)
  face-foreground(nil)
  byte-code("\300\301\302\303\304\305%\210\300\306\302\307\304\301%\210\310\311\312\313\314DD\315\316\317\304\306&\7\210\310\320\312\313\321DD\322\316\323\304\306&\7\210\324\325\326\327..." [custom-declare-group nano nil "N Λ N O" :group convenience nano-modeline "N Λ N O Modeline" custom-declare-variable nano-modeline-padding funcall function #f(compiled-function () #<bytecode -0x154e0bfffe90e070>) "Default vertical space adjustment (in fraction of ..." :type (cons (float :tag "Top spacing") (float :tag "Bottom spacing")) nano-modeline-position #f(compiled-function () #<bytecode 0x1f402b5e61b54>) "Default position for the nano modeline" (choice (const :tag "Top" nano-modeline-header) (const :tag "Bottom" nano-modeline-footer)) custom-declare-face nano-modeline-active t :foreground face-foreground default :background face-background header-line :box :line-width 1 :color "Face for when line is active" nano-modeline-inactive :inherit facep nano-faded (nano-modeline-active) "Face for when line is inactive" nano-modeline-status shadow (:inherit bold) "Face for line status" nano-modeline-button-active-face :family "Roboto Mono" 2 (:style none) "Active button face" ...] 15)
  require(nano-modeline nil t)
  (not (require 'nano-modeline nil t))
  (if (not (require 'nano-modeline nil t)) (display-warning 'use-package (format "Cannot load %s" 'nano-modeline) :error))
  (condition-case err (if (not (require 'nano-modeline nil t)) (display-warning 'use-package (format "Cannot load %s" 'nano-modeline) :error)) ((debug error) (funcall use-package--warning19 :catch err)))
  (progn (use-package-ensure-elpa 'nano-modeline '(t) 'nil) (defvar use-package--warning19 #'(lambda (keyword err) (let ((msg (format "%s/%s: %s" ... keyword ...))) (display-warning 'use-package msg :error)))) (condition-case err (if (not (require 'nano-modeline nil t)) (display-warning 'use-package (format "Cannot load %s" 'nano-modeline) :error)) ((debug error) (funcall use-package--warning19 :catch err))))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  command-execute(eval-last-sexp)

I think the problem is that there is no nano-faces package available on ELPA. Maybe more of the nano packages are even missing.

@rougier
Copy link
Owner

rougier commented Jun 19, 2023

I updated nano-modeline (on ELPA) a few days ago and that might be the problem. However, it is not supposed to use nano-faces that are only part of nano-emacs. Did you change anything on your config ?

@aschmitz-crnc
Copy link
Author

aschmitz-crnc commented Jun 19, 2023

No, I changed nothing. I used to simply have this line:

   (use-package nano-modeline
    :ensure t)

Since the semantics of nano-modeline changed in the past months, I now have this configuration, but still doesn't help, as I still get the illegal face error:

  (use-package nano-modeline
    :ensure t)
  (add-hook 'prog-mode-hook #'nano-modeline-prog-mode)
  (nano-modeline-text-mode t)

@rougier
Copy link
Owner

rougier commented Jun 19, 2023

Can you try from Emacs -Q?

@aschmitz-crnc
Copy link
Author

aschmitz-crnc commented Jun 20, 2023

Yes, tried, and gives the same error once I require the nano-modeline package.

(require 'nano-modeline)
-> face-attribute: Invalid face

@rougier
Copy link
Owner

rougier commented Jun 20, 2023

What is your emacs version? Also, can you try downloading the GitHub version and evaluate the buffer?

@aschmitz-crnc
Copy link
Author

aschmitz-crnc commented Jun 20, 2023

My Emacs version:

GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2023-06-02

I cloned your repo and evaluated the nano-modeline.el buffer and now I have a blank modeline:
image

EDIT: Before you ask -- same thing happens with emacs -Q

@rougier
Copy link
Owner

rougier commented Jul 17, 2023

Sorry for late anwer. You mean jus evaluating the buffer make the mode-line blank?

@aschmitz-crnc
Copy link
Author

Yes, exactly.

@aschmitz-crnc
Copy link
Author

Quick feedback: I just upgraded to Emacs 29.1 and nano-modeline works again.

One thing to note though: When nano-modeline is displayed at the TOP of the window, the regular modeline is also visible. When at the bottom only nano-modeline is visible. Is this intentional?

@rougier
Copy link
Owner

rougier commented Aug 24, 2023

I try not to modify user setup too muh and you need to disable modeline by yourself.

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

No branches or pull requests

2 participants