protesilaos / modus-themes

Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).
https://protesilaos.com/emacs/modus-themes
GNU General Public License v3.0
526 stars 29 forks source link

Org heading leading stars not hidden #76

Closed pilipovicn closed 1 year ago

pilipovicn commented 1 year ago

Hi Prot, thanks for the nice packages!

The problem I have is that in Org mode, the heading stars are not hidden even though I set org-hide-leading-stars. This is only a problem with the modus themes, as it works well, for example, with doom themes.

The stars aren't "reachable" with a cursor, as if they are inside the page margins (can't place a cursor on them, and cant inspect their face).

Here is an example with modus-vivendi-tinted. image

And here is an example with doom-old-hope. image

The thing that gets rid of those stars is disabling org-indent-mode that I've enabled, but I'd like not to do that because it looks better with indents.

Here is an example on a modus theme, with org-indent-mode disabled. image

This could very well be a weird thing on org-indent' part and not on modus-themes end, or maybe I've messed something up.

protesilaos commented 1 year ago

Hello @pilipovicn!

Have you tried to call org-mode-restart after changing the value of the org-hide-leading-stars?

Here is what I get:

2023-04-23_13:36:24_1914x1041

2023-04-23_13:37:22_1914x1041

pilipovicn commented 1 year ago

Yes I restart org mode between each variable change. Do you have org-indent-mode turned on? Because I get the same result as you if I turn it off, example below:

image

But when I turn on org-indent-mode it becomes this: image

In both examples, org-hide-leading-starts is true. (in these examples I disabled org-superstar package so I could get the same results as you). Again, for comparison, the doom-old-hope theme does not add the stars when I turn on org-indent-mode

protesilaos commented 1 year ago

The org-indent-mode does not make any difference on my end:

2023-04-23_14:28:20_1914x1041

At any rate, the themes set the colour of the "hide" to that of the main background. The relevant part from modus-themes.el:

    `(org-hide ((,c :foreground ,bg-main)))
    `(org-indent ((,c :inherit (fixed-pitch org-hide))))

Can you try to reproduce your problem with emacs -Q? If you are not sure how to do it, I will write instruction.

protesilaos commented 1 year ago

Looking at the code now, have you explicitly set the foreground of the fixed-pitch face?

pilipovicn commented 1 year ago

Ah, that was it! Didn't know that would mess up the theme. The problematic line was (set-face-attribute 'fixed-pitch nil :family "Roboto Mono" :inherit 'default) So i removed the inherit part so it doesn't pick up the foreground color from default, and it works now. But now it doesn't inherit the font size either, but I will figure something out. I think this is solved now on my end. Thank you for the help!

protesilaos commented 1 year ago

Very well! In general, faces do not need to inherit from default. This is done implicitly for all their missing attributes.