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

all-the-icons--icon-info-for-buffer returns wrong icons #145

Closed
seagle0128 opened this issue Apr 9, 2019 · 4 comments
Closed

all-the-icons--icon-info-for-buffer returns wrong icons #145

seagle0128 opened this issue Apr 9, 2019 · 4 comments

Comments

@seagle0128
Copy link
Contributor

(defun all-the-icons--icon-info-for-buffer (&optional f)

Hi, Thanks for this great package!

I found all-the-icons-icon-for-buffer returns wrong icons some times, then I reviewed the codes, and found the logic in all-the-icons--icon-info-for-buffer may be incorrect. I don't understand why it calls all-the-icons-auto-mode-match?. I think it should check all-the-icons-mode-icon-alist as you mentioned in #15 (comment).

Besides, IMO all-the-icons-mode-icon-alist should not be ###autoload since it's an internal function, while should add to all-the-icons-icon-for-buffer and all-the-icons-icon-for-dir.

@wyuenho
Copy link
Collaborator

wyuenho commented Apr 16, 2019

Yep, thid function is a bit of a pain, care to open a PR?

@seagle0128
Copy link
Contributor Author

@wyuenho Hmm... I tried some solutions locally and understood these codes completely. It seems a trade-off, but the most of the icons are appropriate. I'd like close it for now, and will reopen and submit a PR if I found a better solution. Thanks!

@LukeXuan
Copy link

LukeXuan commented Sep 8, 2021

Hello, I would like to revive this issue as I'm quite bothered by this bug. In particular, I'm using both Coq and Verilog languages and both of them share the same extension ".v".

I believe the fix to the problem is to not check the major-mode against the auto-mode-alist, but rather some other association list generated from the all-the-icons-extension-icon-alist.

@bestlem
Copy link

bestlem commented Sep 9, 2021

Also see #275

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

4 participants