ryuslash/mode-icons

Option mode-icons-change-mode-name disables in mode-line

ReneFroger opened this issue · 5 comments

Hi there!k

When I set the option (setq mode-icons-change-mode-name nil), to prevent being displayed in the Helm buffers (because the mode icons cause the helm buffers not being aligned properly), I noticed it also disables the mode icons being displayed in the mode line.

Is there any way to prevent mode icons being displayed in Helm buffers, but keep being displayed in the mode line?

It might be worth to note that I use smart mode line package.

You need to initilize mode-icons after sml/setup.

For me

(setq mode-icons-change-mode-name nil)
(require 'smart-mode-line)
(sml/setup)
(mode-icons-mode 1)

Works fine.

If this still doesn't work for you, please share the version of emacs and smart mode line you are using.

@ReneFroger did this work for you?

Matt

Sorry for my belated response, I'm currently abroad. Will back soon on this issue the next day.

(setq mode-icons-change-mode-name nil) indeed didn't help. This is my configuration with mode-icons in pair with smart mode line.

(setq mode-icons-change-mode-name nil)

(defun mu-get-buffer-size ()
  "Get a fancier version of `buffer-size'."
  (cond
   ((> (buffer-size) 1000000)
    (format "%7.1fM" (/ (buffer-size) 1000000.0)))
   ((> (buffer-size) 1000)
    (format "%7.1fk" (/ (buffer-size) 1000.0)))
   (t (format "%l" (buffer-size)))))


(setq display-time-default-load-average nil)

(setq-default mode-line-buffer-identification
              (let ((orig (car mode-line-buffer-identification)))
                `(:eval (cons (concat ,orig " " (abbreviate-file-name default-directory))
                              (cdr mode-line-buffer-identification)))))

(setq display-time-default-load-average nil) 
(add-hook 'after-init-hook 'display-time)

(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq sml/no-confirm-load-theme t)
(setq sml/name-width 60)
(sml/setup)

(setq-default mode-line-end-spaces
              (append mode-line-end-spaces '("%I")))

(mode-icons-mode 1)


My Emacs version is: GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-25 and it's the latest version from the repository of smart mode line.