From: Drew Adams <drew.adams@oracle.com>
To: "Clément Pit-Claudel" <clement.pitclaudel@gmail.com>,
4911@debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Sun, 26 Apr 2020 10:22:09 -0700 (PDT) [thread overview]
Message-ID: <e4dd9b38-d94d-4971-9101-b22576da6093@default> (raw)
In-Reply-To: <35268628-9ef1-8dd2-ab93-05ca1cae06be@gmail.com>
> >> But to some extent it makes sense, since that's how links behave on
> >> the web (merging faces), so it's hart to fault users for having the
> >> same expectation in Emacs.
> >
> > Really? A mouseover action over a link in a web browser
> > doesn't change the link appearance, by default.
>
> Most websites do, I think (I just checked Google, the New York Times,
> and gnu.org), but you're right that the default style sheet doesn't
> include a face change..
I don't think I see that on nytimes.com or google.com.
I do see a mouseover "face" change on both, on inline
links in text, but what I see is all or nothing. For
NYT, for example, a link is shown underlined, and
mouseover removes the underline - IOW, two different
"faces", and mouseover uses the same face for all of
the link text.
I don't see examples of link text that has (the
equivalent of) multiple faces, so I can't see what
happens with mouseover on such links.
Do you have an example of a link on some such site,
where the link text uses multiple "faces" and
mouseover preserves those faces while perhaps adding
or removing some "face attributes" across all of them?
> > The one case where I might want something like what
> > you propose (or maybe exactly like it, depending on
> > just what it is), would be when mouseover essentially
> > underlines (or overlines or otherwise doesn't
> > obscure) the text. In that case, I can see a value
> > to continuing to show the foreground colors of the
> > underlined text - if that's realizable.
>
> Yes yes yes! We are in violent agreement here :)
I thought so. But probably "more or less", and not
violently. ;-)
> > > Why is that helpful?
> >
> > It can perhaps be easier to see the extent of the
> > link? Easier to notice the link? Dunno.
>
> With the change of background, it's actually quite readable.
I think it can depend on the background, and how it
interacts with the default/frame face and with the
faces used in the link text. You may be right that
in general most mouseover backgrounds would not be
problematic; dunno.
> > Anyway, I agree that it's helpful to keep face
> > highlighting is some cases - in particular when,
> > say, an entire line of code is highlighted.
> > The effect of, say, `hl-line-mode' is what I
> > prefer in a case like that - and yes, that's
> > merging. Similarly, for the region. I think
> > it's less likely to be useful for links (i.e.,
> > for mouseover). But I could be wrong.
>
> Yup, I feel just the same about hl-line-mode and the region. I find
> the effect of foreground colors being reset when the background changes
> due to hovering quite distracting, but I agree there's personal taste
> involved.
The question is really about links (mouseover).
> > It's fine to provide a way (some other way - e.g.
> > via a variable or another property or whatever)
> > to have mouseover merge a face instead of imposing
> > it.
>
> Yes, I think all your suggestions are good approaches.
It would be good to try a patch, in some context where
there is already lots of use of different faces. One
such context is the use of font-lock faces, but in most
such uses there isn't much predefined use of links.
> Thanks again for your input,
And thank you for the suggestion/bug report, and
attention to providing the new feature only as an
option/alternative.
(BTW, why doesn't the bug # appear in the subject line?)
prev parent reply other threads:[~2020-04-26 17:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 12:41 bug#4911: mouse-face property should merge face attributes, not replace Dave Aspinall
2019-10-01 14:08 ` Lars Ingebrigtsen
2019-10-01 14:36 ` Basil L. Contovounesios
2019-10-01 15:00 ` Eli Zaretskii
2019-10-01 15:14 ` Lars Ingebrigtsen
2019-10-01 16:46 ` Drew Adams
2020-04-10 16:26 ` Clément Pit-Claudel
2020-04-25 21:22 ` Clément Pit-Claudel
2020-04-25 22:13 ` Drew Adams
2020-04-26 3:10 ` Clément Pit-Claudel
2020-04-26 13:34 ` Eli Zaretskii
2020-05-04 15:16 ` Clément Pit-Claudel
2020-05-08 14:39 ` Eli Zaretskii
2020-05-08 15:01 ` Clément Pit-Claudel
2020-05-08 15:20 ` Eli Zaretskii
2020-05-08 15:58 ` Clément Pit-Claudel
2020-04-26 17:22 ` Drew Adams [this message]
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=e4dd9b38-d94d-4971-9101-b22576da6093@default \
--to=drew.adams@oracle.com \
--cc=4911@debbugs.gnu.org \
--cc=clement.pitclaudel@gmail.com \
--cc=larsi@gnus.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 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).