protesilaos / ef-themes

Colourful and legible themes for GNU Emacs
GNU General Public License v3.0
285 stars 16 forks source link

White margin in indented org-mode files #43

Open logc opened 1 month ago

logc commented 1 month ago

Description

On using ef-themes, all Org files started to show a white left margin in all places where text is indented, such as headings and body.

My configuration for using ef-themes is this:

(use-package ef-themes
  :config
  (setq ef-themes-mixed-fonts t)
  :init
  (ef-themes-load-random 'dark))

My (relevant) configuration for org-mode, with only one variable set, org-startup-indented. Commenting out this variable solves the issue:

(use-package org
  :config
  (setq
   ;; org-startup-truncated nil
   org-startup-indented t
   ;; org-startup-folded t
   )
  ;; (setq org-hide-leading-stars t)
  )

However, the problem seems to also happen when the org-mode file uses the option #+STARTUP: indent. Both the variable and the startup option are associated to org-indent-mode, a minor mode of org-mode.

This affects all ef-themes, but it is much more noticeable in a dark theme.

Screenshots

Effect of org-startup-indented

Screenshot 2024-06-04 at 13 36 58

Effect of #+STARTUP: indent

Screenshot 2024-06-04 at 13 45 26

Effect on a light theme

Screenshot 2024-06-04 at 13 56 07
protesilaos commented 1 month ago

From: Luis Osa @.***> Date: Tue, 4 Jun 2024 04:59:04 -0700

Description

On using ef-themes, all Org files started to show a white left margin in all places where text is indented, such as headings and body.

I think what is happening is that somewhere in your configuration there is a setting for the 'org-indent' face. Can you check? It may be in that "Custom" snippet of code that Emacs automatically appends to your init file by default (or inside the 'custom-file' if you are defining that).

-- Protesilaos Stavrou https://protesilaos.com

logc commented 1 month ago

No, that does not seem to be the case. If I grep through my whole configuration looking for org-indent, the result is 0 hits.

$ cd .config/emacs
$ rg org-indent
(no output)
logc commented 1 month ago

BTW, thank you very much for your work on these themes! I am reporting the issue in case anyone else has found similar problems ...

protesilaos commented 1 month ago

From: Luis Osa @.***> Date: Tue, 4 Jun 2024 07:28:46 -0700

No, that does not seem to be the case. If I grep through my whole configuration looking for org-indent, the result is 0 hits.

$ cd .config/emacs
$ rg org-indent
(no output)

What is the output of 'M-x describe-face' for the 'org-indent' face?

-- Protesilaos Stavrou https://protesilaos.com

logc commented 1 month ago
Face: org-indent (sample) (customize this face)

Documentation:
Face for outline indentation.
The default is to make it look like whitespace.  But you may find it
useful to make it ever so slightly different.

Defined in ‘org-indent.el’.

           Family: unspecified
          Foundry: unspecified
            Width: unspecified
           Height: unspecified
           Weight: unspecified
            Slant: unspecified
       Foreground: unspecified
DistantForeground: unspecified
       Background: unspecified
        Underline: unspecified
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: unspecified
          Stipple: unspecified
             Font: unspecified
          Fontset: unspecified
           Extend: unspecified
          Inherit: (fixed-pitch org-hide)
protesilaos commented 1 month ago

From: Luis Osa @.***> Date: Mon, 10 Jun 2024 12:21:41 -0700

[... 30 lines elided]

      Inherit: (fixed-pitch org-hide)

Thanks! Please do the same for 'org-hide' and for anything that inherits. We need to know what the source of this colour is.

-- Protesilaos Stavrou https://protesilaos.com

logc commented 1 month ago

Aha! apparently it's org-hide

Face: org-hide (sample) (customize this face)

Documentation:
Face used to hide leading stars in headlines.
The foreground color of this face should be equal to the background
color of the frame.

Defined in ‘org-faces.el’.

           Family: unspecified
          Foundry: unspecified
            Width: unspecified
           Height: unspecified
           Weight: unspecified
            Slant: unspecified
       Foreground: #000000
DistantForeground: unspecified
       Background: unspecified
        Underline: unspecified
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: unspecified
          Stipple: unspecified
             Font: unspecified
          Fontset: unspecified
           Extend: unspecified
          Inherit: unspecified

There is an associated configuration org-hide-leading-stars that I am setting to t. That is the only mention of org-hide in my configuration.