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

Org-Mode Sub-Items Not Indented Consistently in Variable Pitch Mode #9

Closed
stevemolitor opened this issue Aug 25, 2022 · 9 comments
Closed

Comments

@stevemolitor
Copy link

With org-indent-mode on and when using variable-pitch-mode, sub headings and sub-lists are not indented consistently. Here is a gif using ef-winter:

Note that "text" and "* Three" are not indented to the same level for example. Here is the same file using modus-vivendi:

Note that everything lines up in vivendi, but not in ef-winter.

I tried with ef-themes-variable-pitch-ui set to t and nil, same effect.

Thanks for the great themes btw!

protesilaos added a commit that referenced this issue Aug 25, 2022
This is essential for 'org-indent-mode' to align entries correctly.

Thanks to Steve Molitor for reporting the issue 9 over at the GitHub
mirror: <#9>.  Steven
tested a sample file with 'modus-vivendi' and got the desired results.
It reminded me how I handle this face with the 'modus-themes'.
@protesilaos
Copy link
Owner

Thank you @stevemolitor!

I just pushed the change:

  commit c68c71957619c140b8115a1a814f4d764b9246ee
  Author: Protesilaos Stavrou <[email protected]>
  Date:   Thu Aug 25 22:25:10 2022 +0300
  
      Make 'org-indent' always monospaced
      
      This is essential for 'org-indent-mode' to align entries correctly.
      
      Thanks to Steve Molitor for reporting the issue 9 over at the GitHub
      mirror: <https://github.com/protesilaos/ef-themes/issues/9>.  Steven
      tested a sample file with 'modus-vivendi' and got the desired results.
      It reminded me how I handle this face with the 'modus-themes'.
  
   README.org   | 3 ++-
   ef-themes.el | 2 +-
   2 files changed, 3 insertions(+), 2 deletions(-)

Thanks for the great themes btw!

You are welcome!


Are you using the package from GNU ELPA? I plan to release version 0.4.0 in the coming days. Maybe the beginning of next week. This commit will be part of that version.

@stevemolitor
Copy link
Author

@protesilaos Wow that was quick! No I cloned the repo. Will it be available via straight eventually?

I can confirm it works great now, everything is all lined up:

Thanks a bunch!

@protesilaos
Copy link
Owner

Yes, it is available right now if you are using straight.

Thanks a bunch!

You are welcome!

Closing this now.

@rrix
Copy link

rrix commented Sep 20, 2022

Screenshot_20220920_131405

with this change (or maybe surfaces by nix-community/emacs-overlay moving to LUCID build by default?) the hidden stars are being rendered with the default type's foreground -- if i reverse the inherited faces so that (,c :inherit (org-hide fixed-pitch)) it behaves properly:

Screenshot_20220920_131611

@protesilaos
Copy link
Owner

Hi @rrix and thanks for reporting this! Does your fixed-pitch face have an explicit foreground? What does the Help buffer say when you do M-x describe-face and search for fixed-pitch?

@rrix
Copy link

rrix commented Sep 27, 2022

nah, it just inherits default:

Defined in ‘faces.el’.


           Family: Vulf Mono
          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: default

default:

Defined in ‘faces.el’.


           Family: Vulf Mono
          Foundry: OHNO
            Width: normal
           Height: 90
           Weight: normal
            Slant: normal
       Foreground: #cfbcba
DistantForeground: unspecified
       Background: #0f0e06
        Underline: nil
         Overline: nil
   Strike-through: nil
              Box: nil
          Inverse: nil
          Stipple: nil
             Font: #<font-object -OHNO-Vulf Mono-normal-normal-normal-*-18-*-*-*-d-0-iso10646-1>
          Fontset: -OHNO-Vulf Mono-normal-normal-normal-*-18-*-*-*-d-0-fontset-auto2
           Extend: nil
          Inherit: nil

@protesilaos
Copy link
Owner

@rrix Inheriting the default is a problem here because that means it takes the default foreground as well. For reference, this is fixed-pitch in an emacs -Q session:

Face: fixed-pitch (sample) (customize this face)

Documentation:
The basic fixed-pitch face.

Defined in ‘faces.el’.


           Family: Monospace
          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: unspecified

When an attribute's value is unspecified it is taken from the closest relevant context, ultimately falling back to default.

Try to decouple fixed-pitch from default by not inheriting the latter. Simply specify the :family of fixed-pitch and the rest will be done automatically.

@rrix
Copy link

rrix commented Dec 20, 2022

Try to decouple fixed-pitch from default by not inheriting the latter.

circling back: this was the solution, thanks :)

@protesilaos
Copy link
Owner

protesilaos commented Dec 21, 2022 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

3 participants