rougier / nano-emacs

GNU Emacs / N Λ N O - Emacs made simple
GNU General Public License v3.0
2.54k stars 195 forks source link

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

Open aschmitz-crnc opened 1 year ago

aschmitz-crnc commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Can you try from Emacs -Q?

aschmitz-crnc commented 1 year ago

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

(require 'nano-modeline)
-> face-attribute: Invalid face
rougier commented 1 year ago

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

aschmitz-crnc commented 1 year ago

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 commented 1 year ago

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

aschmitz-crnc commented 1 year ago

Yes, exactly.

aschmitz-crnc commented 1 year ago

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 commented 1 year ago

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