unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Protesilaos Stavrou <info@protesilaos.com>
Cc: 54598@debbugs.gnu.org, larsi@gnus.org, pierre.techoueyres@free.fr
Subject: bug#54598: 27.2; Bad interraction between modus-theme and hs-minor-mode
Date: Thu, 07 Apr 2022 11:27:20 +0300	[thread overview]
Message-ID: <831qy9cn87.fsf@gnu.org> (raw)
In-Reply-To: <87ee29migh.fsf@protesilaos.com> (message from Protesilaos Stavrou on Thu, 07 Apr 2022 11:00:14 +0300)

> From: Protesilaos Stavrou <info@protesilaos.com>
> Cc: pierre.techoueyres@free.fr, 54598@debbugs.gnu.org, larsi@gnus.org
> Date: Thu, 07 Apr 2022 11:00:14 +0300
> 
> > 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.

I think it's a side effect of some peculiarity of the particular
implementation.  Did you try that with and without Cairo, for example?

> 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.

On my system, using DejaVu Sans Mono produces a contiguous vertical
line to begin with.

In any case, if that doesn't happen with some default font on some
system, the solution is either specify a font for this face which does
produce a contiguous vertical line, or maybe use an image instead of a
character.

>  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.

The background color fills the entire character cell, which is why it
isn't affected by the line-spacing.  But we have no mechanism that I'm
aware of to make the background be 1-pixel thin.

> >> (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.

The width that it takes is determined by the metrics of the U+2502
character in a particular font used by the variable-pitch face on the
user's platform.  You cannot expect in advance that this width is
indeed thin enough, because that character is not designed for these
purposes.

So I think what you are trying to do is fundamentally unportable, not
as long as characters are used for the indicator.





  reply	other threads:[~2022-04-07  8:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-27 16:17 bug#54598: 27.2; Bad interraction between modus-theme and hs-minor-mode Pierre Téchoueyres
2022-03-29 13:06 ` Lars Ingebrigtsen
2022-03-29 21:05   ` Pierre Téchoueyres
2022-03-31 11:49     ` Lars Ingebrigtsen
2022-03-31 13:08       ` Protesilaos Stavrou
2022-03-31 19:24         ` Pierre Téchoueyres
2022-03-31 19:57           ` Protesilaos Stavrou
2022-03-31 20:19             ` Pierre Téchoueyres
2022-04-01  6:05             ` Eli Zaretskii
2022-04-02 17:53               ` Pierre Téchoueyres
2022-04-02 18:58                 ` Eli Zaretskii
2022-04-02 19:48                   ` Pierre Téchoueyres
2022-04-03  4:18                     ` Protesilaos Stavrou
2022-04-03  5:14                     ` Eli Zaretskii
2022-04-06 18:57                       ` Pierre Téchoueyres
2022-04-07  5:51                         ` Eli Zaretskii
2022-04-07  6:51                           ` Protesilaos Stavrou
2022-04-07  7:31                             ` Eli Zaretskii
2022-04-07  8:00                               ` Protesilaos Stavrou
2022-04-07  8:27                                 ` Eli Zaretskii [this message]
2022-04-07 12:44                                   ` Protesilaos Stavrou
2022-04-07 14:25                                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831qy9cn87.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=54598@debbugs.gnu.org \
    --cc=info@protesilaos.com \
    --cc=larsi@gnus.org \
    --cc=pierre.techoueyres@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).