Open bornbanane opened 2 months ago
Merci !
For the bootstrap:XXX, the problem seems that svg-lib is unable to create the button for some reason. Can you try to toggle debug on error and report the error (if any) ?
I have activated toggle debug on error (M-x toggle-debug-on-error) but it does not stop and report anything else than the previous error of the inial post.
I have done a capture with orgroam this time to have the error with your default button :
Error during redisplay: (eval (let* ((nano-modeline-base-face (nano-modeline--base-face 'header)) (left (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buffer-status "ORG") " " (nano-modeline-buffer-name "Capture") " " (nano-modeline-org-capture-description)))) (right (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buttons (("SAVE" org-capture-finalize . "Save entry to /home/xxxxxx/orgmode/orgroam/daily/2024-05-27.org") ("CANCEL" org-capture-kill . "Delete entry") ("[bootstrap:arrows-expand]" delete-other-windows . "expand")) t) " " (nano-modeline-window-dedicated)))) (width (window-width)) (outside fringes-outside-margins) (left-fringe (if outside -1.0 0.0)) (left-margin (if outside 0.0 1.0)) (right-fringe (if outside -1.0 0.0)) (right-margin (if outside -1.0 0.0)) (left-max-size (- width (length right) 2)) (left (if (> (length left) left-max-size) (concat (truncate-string-to-width left left-max-size) (propertize "…" 'face `(:inherit ,nano-modeline-base-face))) left))) (concat (propertize " " 'display `(space :align-to (+ left-margin (,left-fringe . left-fringe) (,left-margin . left-margin)))) (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-left-fringe-width))) left (propertize " " 'face `(:inherit ,nano-modeline-base-face) 'display `(space :align-to (- right-margin (,right-fringe . right-fringe) (,right-margin . right-margin) (nano-modeline-right-fringe-width) ,(length right)))) right (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-right-fringe-width)))))) signaled (wrong-type-argument listp nano-modeline-button-active-face) [207 times]
I'm not good enough in elisp to understand fully what all that means.
Well I found that : https://www.gnu.org/software/emacs/manual/html_node/elisp/Debugging-Redisplay.html
So here the content of the buffer *Redisplay_trace* after evaluating (setq backtrace-on-redisplay-error t)
Error: wrong-type-argument (listp nano-modeline-button-inactive-face)
mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode 0x107021b139ae86a6>))
debug-early-backtrace()
debug-early(error (wrong-type-argument listp nano-modeline-button-inactive-face))
svg-lib-tag("SAVE" nano-modeline-button-inactive-face)
nano-modeline--make-svg-button("SAVE" nano-modeline-button-inactive-face active)
nano-modeline--make-button((:label "SAVE" :state active :help "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org" :hook org-capture-finalize) t)
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_5>((:label "SAVE" :state active :help "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org" :hook org-capture-finalize))
nano-modeline-buttons((("SAVE" org-capture-finalize . "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org") ("CANCEL" org-capture-kill . "Delete entry") ("[bootstrap:arrows-expand]" delete-other-windows . "expand")) t nil)
apply(nano-modeline-buttons ((("SAVE" org-capture-finalize . "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org") ("CANCEL" org-capture-kill . "Delete entry") ("[bootstrap:arrows-expand]" delete-other-windows . "expand")) t))
(if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))
(lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element))))((nano-modeline-buttons (("SAVE" org-capture-finalize . "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org") ("CANCEL" org-capture-kill . "Delete entry") ("[bootstrap:arrows-expand]" delete-other-windows . "expand")) t))
mapconcat((lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) ((nano-modeline-buttons (("SAVE" org-capture-finalize . "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org") ("CANCEL" org-capture-kill . "Delete entry") ("[bootstrap:arrows-expand]" delete-other-windows . "expand")) t) " " (nano-modeline-window-dedicated)))
(let* ((nano-modeline-base-face (nano-modeline--base-face 'header)) (left (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buffer-status "ORG") " " (nano-modeline-buffer-name "Capture") " " (nano-modeline-org-capture-description)))) (right (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buttons (("SAVE" org-capture-finalize . "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org") ("CANCEL" org-capture-kill . "Delete entry") ("[bootstrap:arrows-expand]" delete-other-windows . "expand")) t) " " (nano-modeline-window-dedicated)))) (width (window-width)) (outside fringes-outside-margins) (left-fringe (if outside -1.0 0.0)) (left-margin (if outside 0.0 1.0)) (right-fringe (if outside -1.0 0.0)) (right-margin (if outside -1.0 0.0)) (left-max-size (- width (length right) 2)) (left (if (> (length left) left-max-size) (concat (truncate-string-to-width left left-max-size) (propertize "…" 'face `(:inherit ,nano-modeline-base-face))) left))) (concat (propertize " " 'display `(space :align-to (+ left-margin (,left-fringe . left-fringe) (,left-margin . left-margin)))) (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-left-fringe-width))) left (propertize " " 'face `(:inherit ,nano-modeline-base-face) 'display `(space :align-to (- right-margin (,right-fringe . right-fringe) (,right-margin . right-margin) (nano-modeline-right-fringe-width) ,(length right)))) right (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-right-fringe-width)))))
eval((let* ((nano-modeline-base-face (nano-modeline--base-face 'header)) (left (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buffer-status "ORG") " " (nano-modeline-buffer-name "Capture") " " (nano-modeline-org-capture-description)))) (right (mapconcat (lambda (element) (if (stringp element) (propertize element 'face nano-modeline-base-face) (apply (car element) (cdr element)))) '((nano-modeline-buttons (("SAVE" org-capture-finalize . "Save entry to /home/xxxxx/orgmode/orgroam/daily/2024-05-27.org") ("CANCEL" org-capture-kill . "Delete entry") ("[bootstrap:arrows-expand]" delete-other-windows . "expand")) t) " " (nano-modeline-window-dedicated)))) (width (window-width)) (outside fringes-outside-margins) (left-fringe (if outside -1.0 0.0)) (left-margin (if outside 0.0 1.0)) (right-fringe (if outside -1.0 0.0)) (right-margin (if outside -1.0 0.0)) (left-max-size (- width (length right) 2)) (left (if (> (length left) left-max-size) (concat (truncate-string-to-width left left-max-size) (propertize "…" 'face `(:inherit ,nano-modeline-base-face))) left))) (concat (propertize " " 'display `(space :align-to (+ left-margin (,left-fringe . left-fringe) (,left-margin . left-margin)))) (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-left-fringe-width))) left (propertize " " 'face `(:inherit ,nano-modeline-base-face) 'display `(space :align-to (- right-margin (,right-fringe . right-fringe) (,right-margin . right-margin) (nano-modeline-right-fringe-width) ,(length right)))) right (propertize " " 'face 'fringe 'display '(space :width (nano-modeline-right-fringe-width))))))
redisplay_internal\ \(C\ function\)()
I hope that can help.
Can you try in a scratch buffer:
(require 'svg-lib)
(insert (propertize "HOME" 'display (svg-lib-tag "[material:home] HOME")))
Hi, sorry for late answer.
Hello,
I use "nano-theme" and "nano-modeline" and instead of seeing icons in modeline I see text [bootstrap:XXX], I see this for exmple when I am in "capture" in orgmode (org roam dailies capture today).
Looking at the sources I see that svg-lib is required, so I add it via a : (use-package svg-lib) in my conf and when I restart my emacs my modeline disappears and I get this kind of error :
Here my conf for nano-modeline :
On the other hand, "modelines" that don't use button like the default org one work very well. And without svg-lib everything is OK but button are juste text [bootstrap:XXX]
PS : C'est un plaisir d'utiliser vos créations 👍