bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54598: 27.2; Bad interraction between modus-theme and hs-minor-mode


From: Protesilaos Stavrou
Subject: bug#54598: 27.2; Bad interraction between modus-theme and hs-minor-mode
Date: Thu, 07 Apr 2022 11:00:14 +0300
User-agent: Notmuch/0.35 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu)

On 2022-04-07, 10:31 +0300, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Protesilaos Stavrou <info@protesilaos.com>
>> Cc: 54598@debbugs.gnu.org, larsi@gnus.org
>> Date: Thu, 07 Apr 2022 09:51:16 +0300
>> 
>> > Not sure I follow: it looks to me like in buffer text the character
>> > looks the same on both system, but as fill-column-indicator the same
>> > character displays much wider on Windows than on GNU/Linux, is that
>> > correct?
>> >
>> > If so, I think the reason is the settings of the face attributes,
>> > especially the background color.  What you see is the background color
>> > whose width is (of course) the entire character cell, not the
>> > character itself.  Can you explain these strange face attributes, and
>> > what did you intend to achieve by using them?
>> 
>> Good day Eli!
>> 
>> The face on GNU/Linux produces a thin line.  Whereas on Windows it
>> covers the entire character cell.  The intent is to get that thin line.
>> If anything, the given face attributes suggest that the GNU/Linux
>> version is the one with the odd looks.
>
> Please explain which part(s) of those face attributes are supposed to
> produce the thin line, and why do you think that should happen.  Maybe
> I'm missing something, but I'm not aware of any face-related feature
> in Emacs that allows us to produce a thin vertical line.  That's why
> we use for fill-column-indicator a character whose image is supposed
> to be such a thin vertical line.

I think the end-result on GNU/Linux is puzzling, given that no face
attribute should explicitly produce this thin line.  Still, this result
was discovered experimentally.

With 'emacs -Q' and a fallback/default typeface such as DejaVu Sans Mono
or Hack:

 1. Create some empty lines in the scratch buffer, such as with 'C-o'.
 2. M-x display-fill-column-indicator-mode

Notice the thin dashed line.

 3. (set-face-attribute 'fill-column-indicator nil :height 1 :background 
"gray50" :foreground "gray50")

The line is now thin and contiguous.

Note that the dashed line up to step 2 depends on the ':family'
attribute of the 'default' face.  For example, Source Code Pro produces
a contiguous line with the above recipe.  Though it too changes to a
dashed style when 'line-spacing' is >= 2.

When the 'fill-column-indicator' is changed with what is in step 3, even
a higher 'line-spacing' value produces a contiguous line.

>> @ Pierre: Assuming that we can only achieve this by tinkering with face
>> attributes, I am happy to make the necessary changes.  Though please
>> note that I cannot test them on Windows.  What happens, for example, if
>> the face also inherits from 'variable-pitch'?
>> 
>> (set-face-attribute 'fill-column-indicator nil :inherit 'variable-pitch 
>> :height 1 :background "gray50" :foreground "gray50")
>
> Why do you think this should change anything?  What do you think the
> inheritance from variable-pitch should do here?

The assumption is that the proportionate spacing will produce a thinner
character cell, as opposed to the 'default' face which in Pierre's case
is a monospaced font.

-- 
Protesilaos Stavrou
https://protesilaos.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]