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

Some icons like read-only indicator don't work in daemon mode #78

Open
Thaodan opened this issue Dec 26, 2020 · 4 comments
Open

Some icons like read-only indicator don't work in daemon mode #78

Thaodan opened this issue Dec 26, 2020 · 4 comments
Assignees

Comments

@Thaodan
Copy link

Thaodan commented Dec 26, 2020

When starting emacs as --daemon vs. normal some icons are not displayed.

Emacs:28.x
Mode-icons: latest melpa

See this screenshot (left daemon, right regular):
Screenshot_20201226_064623

@Thaodan
Copy link
Author

Thaodan commented Dec 26, 2020

I think the bug is related to e29ab28

Before that they work but scale weird (https://user-images.githubusercontent.com/1747359/102846453-aef30c80-4418-11eb-83df-4053db8d9f17.png)

@ryuslash ryuslash self-assigned this Feb 5, 2021
@ryuslash
Copy link
Owner

ryuslash commented Feb 5, 2021

Hi! Thanks for reporting this issue. Sorry I haven't been able to get to helping you yet.

Is this still a problem for you? I've been trying to reproduce this and I don't seem to be able to. I just have (mode-icons-mode) in my init file and I also use Emacs 28.x (specifically GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.17.4) of 2021-02-04) and everything seems to look fine here, I think.

2021-02-05-124751_99x63_scrot

@Thaodan
Copy link
Author

Thaodan commented Sep 14, 2022

I've looking into this again when reworking my init.el (now init.org).
I noticed this related to the modeline mode you use, for example if I just use powerline the icons work.
However If use smart-mode line the mentioned icons don't work.

This the fragment of my emacs config that sets up mode-icons:

** Smart-Mode-Line
   #+begin_src emacs-lisp
      (use-package smart-mode-line
       ;; :after powerline
        :init
        (setq sml/no-confirm-load-theme t)
        (setq sml/theme 'respectful)
        (sml/setup)
        (sml/apply-theme 'powerline))
   #+end_src

** Mode-icons: Show icon instead of mode name if aviable

   #+begin_src emacs-lisp
      (use-package mode-icons
        :after smart-mode-line
        :config
        ;;
        (mode-icons-mode))
   #+end_src
``

@ryuslash
Copy link
Owner

ryuslash commented Nov 4, 2022

Hello again!

Great find! Ok... What I think is happening is that mode-icons tries to find out if the %* construct is in the mode-line-modified variable, which is how by default the read-only indicator is added to the mode-line.
From a very quick look it seems like smart-mode-line doesn't use this construct but instead has its own way to determine and display whether a buffer is read-only or not. So mode-icons can't tell that it's showing a read-only indicator at all...

Do you know of a way to hook in to smart-mode-line so that you can alter the display of its read-only indicator? If so you might be able to add something from mode-icons into it.

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