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

Foreground color in imenu-list #35

Closed
newhallroad opened this issue Jan 1, 2024 · 5 comments
Closed

Foreground color in imenu-list #35

newhallroad opened this issue Jan 1, 2024 · 5 comments

Comments

@newhallroad
Copy link

newhallroad commented Jan 1, 2024

Thank you for your magnificent work on emacs. I use your work more or less every day and I appreciate your packages and your meticulous documentation.

I use the imenu-list package to provide a sidebar buffer with the imenu entries of the buffer I am editing. I typically use this when I am writing text in markdown. In ef-themes, the foreground colors of the imenu-list buffer do not match the face of the headings in the markdown buffer. It seems that imenu-list is not affected by ef-themes, while the markdown headers are.

I solved/hacked the problem with the settings below, which I put in the :config block of my use-package configuration for imenu-list, but perhaps you would be interested in making a more sustainable fix in the ef-themes code.

Many, many thanks.

  (set-face-attribute 'imenu-list-entry-face-0 nil :foreground 'unspecified :inherit 'markdown-header-face-1)
  (set-face-attribute 'imenu-list-entry-face-1 nil :foreground 'unspecified :inherit 'markdown-header-face-2)
  (set-face-attribute 'imenu-list-entry-face-2 nil :foreground 'unspecified :inherit 'markdown-header-face-3)
  (set-face-attribute 'imenu-list-entry-face-3 nil :foreground 'unspecified :inherit 'markdown-header-face-4)
protesilaos added a commit that referenced this issue Jan 1, 2024
Thanks to newhallroad for bringing this matter to my attention in
issue 35 on the GitHub mirror:
<#35>.
@protesilaos
Copy link
Owner

Hello @newhallroad and Happy New Year!

Thank you for your magnificent work on emacs. I use your work more or less every day and I appreciate your packages and your meticulous documentation.

You are welcome!

[...] but perhaps you would be interested in making a more sustainable fix in the ef-themes code.

Yes, sure! I just made a change. I am mimicking what I do with the modus-themes. Please let me know if that works for you.

@newhallroad
Copy link
Author

Wow, you are very quick. Thank you.
The colors are still not quite right, but I think I know why. Awkwardly, markdown-mode starts numbering header faces from markdown-header-face-1 but imenu-list-mode starts from imenu-list-entry-face-0. So I believe imenu-list-entry-face-[n] should be the same as markdown-header-face-[n+1]. Currently I don't think that off-set is taken into account in ef-themes. Hopefully that's an easy fix.

protesilaos added a commit that referenced this issue Jan 3, 2024
This way it follows the ordinary headings in Org, Markdown, etc.

Thanks to newhallroad for the feedback. This was done in issue 35 on
the GitHub mirror: <#35>.
@protesilaos
Copy link
Owner

protesilaos commented Jan 3, 2024 via email

@newhallroad
Copy link
Author

That's it! Solved! Thank you!

@protesilaos
Copy link
Owner

protesilaos commented Jan 4, 2024 via email

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