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

Icons have wrong name #99

Closed
Luis-Henriquez-Perez opened this issue Feb 1, 2018 · 12 comments
Closed

Icons have wrong name #99

Luis-Henriquez-Perez opened this issue Feb 1, 2018 · 12 comments

Comments

@Luis-Henriquez-Perez
Copy link

I have the icons installed but for some reason they are named incorrectly.
For example after checking the icons and their respective names you can see pretty much all of them don't correspond to the right icon.
bad-icons

@md1023
Copy link

md1023 commented Feb 15, 2018

I've evaluated (insert (all-the-icons-octicon "file-directory" :v-adjust all-the-icons-dired-v-adjust :face 'all-the-icons-dired-dir-face)) in scratch buffer and got lighting symbol instead of folder. See details in jtbm37/all-the-icons-dired#13.

Something wrong happened since I've upgraded to 20180125.757 version. Strangely, dired icons broke, but neotree looks as it should.

Advise how to debug issue.

@md1023
Copy link

md1023 commented Feb 20, 2018

I disabled font-lock M-x global-font-lock-mode RET, refreshed dired buffer and all icons got proper glyphs!

@leodumont
Copy link

@md1023 Thanks, it works for me too.

@Luis-Henriquez-Perez
Copy link
Author

For me when I disable the font lock and then refresh the dired buffer the icons all become folders. I don't think this is completely right as I recall when the icons were the right images, some folders (like the download folder) was different.
Also for me this doesn't last. After the font lock and refresh when I exit dired and return to dired, the icons are wrong again.

@md1023
Copy link

md1023 commented Feb 24, 2018

My solution is temporary, I put a hook:

(defun simno-dired-mode-setup ()
  "show less information in dired buffers"
  (dired-hide-details-mode 1)
  (local-set-key (kbd "TAB") 'dired-subtree-cycle)
  (font-lock-mode 0)
)

(add-hook 'dired-mode-hook 'simno-dired-mode-setup)

Looking forward to new versions. Some folks don't have problems on Emacs 26, we'll see.

@andersjohansson
Copy link

See #105 for more info and a proposed fix in #106

@Luis-Henriquez-Perez
Copy link
Author

This works. However I will note that I needed to manually replace the functions added with font-lock+ using overriding advice. I don't mind this because I think it's better practice to override using advising than to overwrite it by defining a function with the same name. Since the code of font-lock+ is pretty short I just copied over the functions to my config and appended a '+' to them so that they can be distinguished from the original.

For example:
;; override original with new
(advice-add 'font-lock-default-unfontify-region :override #'+font-lock-default-unfontify-region)

@seagle0128
Copy link
Contributor

This issue still exists with GNU Emacs 25 on Ubuntu 18.04..

@zzantares
Copy link

Same issue here, what's exactly the fix? to install font-lock+.el? to manually edit all-the-icons.el?

@uKLEina
Copy link

uKLEina commented Jun 21, 2018

I had the same problem.

I use el-get.el to install all-the-icons.el and it requires font-lock+.el in its recipe, so I already had font-lock+.el itself.

However, it seems all-the-icons.el doesn't load font-lock+.el in it, so just add
(require 'font-lock+)
in the .emacs and that solves the problem for me, i.e. shows icons correctly and font-lock is still enabled on the other characters.

Edit: My environment is Emacs 26.1 on Debian Buster, built by myself from source, configure options are all default.

@buzztaiki
Copy link

I send PR jtbm37/all-the-icons-dired#21 to fix this issue of all-the-icons-dired.

@wyuenho
Copy link
Collaborator

wyuenho commented Feb 15, 2019

Fixed by #106

@wyuenho wyuenho closed this as completed Feb 15, 2019
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

9 participants