all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <clement.pitclaudel@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 4911@debbugs.gnu.org
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Fri, 8 May 2020 11:58:13 -0400	[thread overview]
Message-ID: <9044f24e-ca0e-2701-ad7a-0b241f2d69a4@gmail.com> (raw)
In-Reply-To: <83368aihcb.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1854 bytes --]

On 08/05/2020 11.20, Eli Zaretskii wrote:
>> Cc: drew.adams@oracle.com, 4911@debbugs.gnu.org, larsi@gnus.org
>> From: Clément Pit-Claudel <clement.pitclaudel@gmail.com>
>> Date: Fri, 8 May 2020 11:01:35 -0400
>>
>>> I'm not sure I understand what you mean by "span" in general and
>>> "current span" in particular.
>>
>> I meant a range of text with a single mouse-face property.
> 
> But if the underlying text has different face properties, the range of
> text should now be divided into different "spans", no?

Yes, sorry for the confusing terminology :'(
Basically I meant to say that we keep the code used for locating which span of text is covered by a mouse highlight; namely, we look for a range of text with an `eq' mouse-face value.

>>>   . realizing and caching 2 faces whenever we render some text which
>>>     has a mouse-face property;
>>
>> Don't we already do this, currently?
> 
> No, because we only have a single mouse-face.  With this feature, we'd
> have multiple ones, and they are only known when the face of the text
> is being realized, because each character could have different sources
> of face information, which need to be merged.

Ah, I see.  Right now we don't need to look at the regular faces at all; of course.

>>>   . using the corresponding face when redrawing the highlighted
>>>     portions of text by looking at the positions of each of the
>>>     affected glyphs (which might be complicated if the text doesn't
>>>     come from a buffer)
>>
>> But isn't that already taken care of by the existing highlighting code?
> 
> No, because the existing code always uses the same mouse-face.  So it
> only needs to know which glyphs need to be redrawn with that single
> face.

Got it.  My hope was that changing Mouse_HLInfo would allow us to get this almost "for free"


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-05-08 15:58 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 [this message]
2020-04-26 17:22         ` Drew Adams

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=9044f24e-ca0e-2701-ad7a-0b241f2d69a4@gmail.com \
    --to=clement.pitclaudel@gmail.com \
    --cc=4911@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --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 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.