all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: hl-line mode -- visual effect
Date: Wed, 10 Aug 2022 21:10:35 +0300	[thread overview]
Message-ID: <831qtoq89w.fsf@gnu.org> (raw)
In-Reply-To: <CAH8Pv0g28gpTnbwDCtKmZy9jML93hVhmtdvECvh5eGqgFadRRg@mail.gmail.com> (message from Dani Moncayo on Wed, 10 Aug 2022 19:51:29 +0200)

> From: Dani Moncayo <dmoncayo@gmail.com>
> Date: Wed, 10 Aug 2022 19:51:29 +0200
> 
> Until now, I have customized the "hl-line" font to set a background
> color, slightly more saturated than the background of the "default"
> font.
> 
> This approach has worked reasonably well for me for quite some time.
> But it's not perfect: I have buffers (eg. "*Diff*" buffer)
> where the background color of each line conveys valuable semantic
> information (added line, removed line, ...), and thus, in those
> buffers,
> my current approach doesn't work well, because the background color of
> the selected line is fixed (i.e. _overrides_ the _original_ background
> color of the line).
> 
> So, I'd like to highlight the selected line in a more subtle way: I'd
> like the selected line to slightly alter[1] the _original_ background
> color.
> 
> Does Emacs currently provide a reasonably simple way to achieve this?

No, at least not in the way you put it.  When Emacs merges two colors
each of which has the same attribute (in this case, background color)
defined, only one of them "wins".

What you could do is highlight the line using face attributes other
than fore-/background colors.  But you already know that.



  reply	other threads:[~2022-08-10 18:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 17:51 hl-line mode -- visual effect Dani Moncayo
2022-08-10 18:10 ` Eli Zaretskii [this message]
2022-08-10 19:45 ` Jean Louis
2022-08-11  7:27 ` Dani Moncayo
2022-08-11 21:16   ` Jean Louis
2022-08-12  5:40     ` Eli Zaretskii
2022-08-12  6:20     ` Dani Moncayo
2022-08-12  6:24       ` tomas

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

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

  git send-email \
    --in-reply-to=831qtoq89w.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.