* hl-line mode -- visual effect
@ 2022-08-10 17:51 Dani Moncayo
2022-08-10 18:10 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Dani Moncayo @ 2022-08-10 17:51 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org list
Hello guys,
I have this in my init file, to enable "hl-line" mode in all my buffers:
(global-hl-line-mode 1)
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?
TIA
--
Dani Moncayo
[1] "alter" could be something like "increase a bit the saturation or lightness"
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hl-line mode -- visual effect
2022-08-10 17:51 hl-line mode -- visual effect Dani Moncayo
@ 2022-08-10 18:10 ` Eli Zaretskii
2022-08-10 19:45 ` Jean Louis
2022-08-11 7:27 ` Dani Moncayo
2 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-08-10 18:10 UTC (permalink / raw)
To: help-gnu-emacs
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hl-line mode -- visual effect
2022-08-10 17:51 hl-line mode -- visual effect Dani Moncayo
2022-08-10 18:10 ` Eli Zaretskii
@ 2022-08-10 19:45 ` Jean Louis
2022-08-11 7:27 ` Dani Moncayo
2 siblings, 0 replies; 8+ messages in thread
From: Jean Louis @ 2022-08-10 19:45 UTC (permalink / raw)
To: Dani Moncayo; +Cc: help-gnu-emacs@gnu.org list
Just use one of built-in themes with {M-x customize-themes RET} and
choose the one or two which gives you pleasant contrasts or how you
find it nice.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hl-line mode -- visual effect
2022-08-10 17:51 hl-line mode -- visual effect Dani Moncayo
2022-08-10 18:10 ` Eli Zaretskii
2022-08-10 19:45 ` Jean Louis
@ 2022-08-11 7:27 ` Dani Moncayo
2022-08-11 21:16 ` Jean Louis
2 siblings, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2022-08-11 7:27 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org list
Good Morning,
I forgot to subscribe to the mailing list before posting. Sorry about that.
I've seen your replies from the mailing list web archives.
Thanks to Eli and Jean for replying.
--
Dani Moncayo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hl-line mode -- visual effect
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
0 siblings, 2 replies; 8+ messages in thread
From: Jean Louis @ 2022-08-11 21:16 UTC (permalink / raw)
To: Dani Moncayo; +Cc: help-gnu-emacs@gnu.org list
* Dani Moncayo <dmoncayo@gmail.com> [2022-08-11 10:32]:
> I forgot to subscribe to the mailing list before posting. Sorry
> about that.
You need not be subscribed to mailing list. When people respond you
will get an answer. You can simply write to mailing list without being
subscribed.
Wow, what a freedom in GNU.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hl-line mode -- visual effect
2022-08-11 21:16 ` Jean Louis
@ 2022-08-12 5:40 ` Eli Zaretskii
2022-08-12 6:20 ` Dani Moncayo
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-08-12 5:40 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Fri, 12 Aug 2022 00:16:49 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: "help-gnu-emacs@gnu.org list" <help-gnu-emacs@gnu.org>
>
> * Dani Moncayo <dmoncayo@gmail.com> [2022-08-11 10:32]:
> > I forgot to subscribe to the mailing list before posting. Sorry
> > about that.
>
> You need not be subscribed to mailing list. When people respond you
> will get an answer.
That depends on how people respond. I, for example, respond only to
the list, on this list.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hl-line mode -- visual effect
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
1 sibling, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2022-08-12 6:20 UTC (permalink / raw)
To: Dani Moncayo, help-gnu-emacs@gnu.org list
On Thu, Aug 11, 2022 at 11:33 PM Jean Louis <bugs@gnu.support> wrote:
>
> You need not be subscribed to mailing list. When people respond you
> will get an answer. You can simply write to mailing list without being
> subscribed.
I didn't see any reply in my inbox, because (1) your reply somehow
went directly to my "Spam" folder (I don't know why), and (2) Eli
replied only to the list.
Thanks.
--
Dani Moncayo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hl-line mode -- visual effect
2022-08-12 6:20 ` Dani Moncayo
@ 2022-08-12 6:24 ` tomas
0 siblings, 0 replies; 8+ messages in thread
From: tomas @ 2022-08-12 6:24 UTC (permalink / raw)
To: Dani Moncayo; +Cc: help-gnu-emacs@gnu.org list
[-- Attachment #1: Type: text/plain, Size: 543 bytes --]
On Fri, Aug 12, 2022 at 08:20:56AM +0200, Dani Moncayo wrote:
> On Thu, Aug 11, 2022 at 11:33 PM Jean Louis <bugs@gnu.support> wrote:
> >
> > You need not be subscribed to mailing list. When people respond you
> > will get an answer. You can simply write to mailing list without being
> > subscribed.
>
> I didn't see any reply in my inbox, because (1) your reply somehow
> went directly to my "Spam" folder (I don't know why),
Gmail is like that: ain't them charming?
> and (2) Eli replied only to the list.
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-08-12 6:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 17:51 hl-line mode -- visual effect Dani Moncayo
2022-08-10 18:10 ` Eli Zaretskii
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
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).