From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Newsgroups: gmane.emacs.bugs Subject: bug#4911: mouse-face property should merge face attributes, not replace Date: Fri, 8 May 2020 11:58:13 -0400 Message-ID: <9044f24e-ca0e-2701-ad7a-0b241f2d69a4@gmail.com> References: <8452d0c8-afc3-bdb8-2c88-f66dc770c3c4@gmail.com> <0955d0dd-c4fe-4feb-b68b-0ed212ccf291@default> <35268628-9ef1-8dd2-ab93-05ca1cae06be@gmail.com> <83blne74mk.fsf@gnu.org> <83a72iij8l.fsf@gnu.org> <38d17eb2-ba5b-30a6-d9ac-ec18ee7d8fe9@gmail.com> <83368aihcb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6LfaAs7gB8cx7qxc2sgJpJct8Reo01iwb" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56283"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: larsi@gnus.org, 4911@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 08 18:04:03 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jX5Tm-000EWl-U2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 18:04:03 +0200 Original-Received: from localhost ([::1]:37016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX5Tl-0001YD-RV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 12:04:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX5Ow-00030y-51 for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 11:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX5Ov-0002Gr-RK for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 11:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jX5Ov-0005VR-Q1 for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 11:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 May 2020 15:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4911 X-GNU-PR-Package: emacs Original-Received: via spool by 4911-submit@debbugs.gnu.org id=B4911.158895351321131 (code B ref 4911); Fri, 08 May 2020 15:59:01 +0000 Original-Received: (at 4911) by debbugs.gnu.org; 8 May 2020 15:58:33 +0000 Original-Received: from localhost ([127.0.0.1]:46171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX5OK-0005Ub-Ij for submit@debbugs.gnu.org; Fri, 08 May 2020 11:58:33 -0400 Original-Received: from mail-qk1-f170.google.com ([209.85.222.170]:44196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX5OI-0005UP-GS for 4911@debbugs.gnu.org; Fri, 08 May 2020 11:58:22 -0400 Original-Received: by mail-qk1-f170.google.com with SMTP id b6so918337qkh.11 for <4911@debbugs.gnu.org>; Fri, 08 May 2020 08:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to; bh=L7mkWptrM2LNYIxqNTSnFnrScxxPs1rIqBapvyA9lX8=; b=cCTDJLJxcygUW+pTFWnkzDbeYsuLQPsvw3UIjibaJ8nWkJUk8f/RbswWlZlsQEGGaS 8WeSjBzMkUJeXVx/n0jiNnymfM7ywifixWVq4U6XnZzAD7iOt4Z7uT5gguRhgiCKdnJj s7bfKtRnnqxHCjWh1gIKE/Y0JDg+Gdy346uujnWfE3Xr3T5+sTRzYT0d3xr0FSC94Pi+ bOfzUuVGEL3DAT/9rwcbHihuum6PCLAI+foTUnv+03OU8KtVJhA1LcakLuL3aaMcC1jl /FHIREfqimiHVm9kszL0gRQku8fCIgr+3A58Zy6HcVyP1iy3phWyXFVARHQdOQwNkk0m oVAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to; bh=L7mkWptrM2LNYIxqNTSnFnrScxxPs1rIqBapvyA9lX8=; b=eWCva2T7OrlvPMsl83YVcQ+b3C8/7ec3q1PYzKJA530b8vqWpjnKIJzDQ7NFwhjXtY 3jixlnlbMY2AUdW2Pt1+9xWg5DEvhI16n80CV6cxKJUIexiRZo14941EaA2FwWUqqxqe qtljdyNbw5zTLseq1iIH987YjAQbL2lY+6256tNrbzvzr6xNfAelGnOhRhMBnFRAUa7l Tzw8zA0Iw1uC3Ltq12vSRgGEHohwNneDCMpX2V6er+DpuipkaMPcUGS7C4+HJEx0HJ7w CsWltgcEgL/ftNMBxWPk71MWtIaTa7RxouLfRLjki8/JNsbbxAeMYYd7OI7arpl3T/ql Zx7Q== X-Gm-Message-State: AGi0PuYZTikrMrezFXTGq+7Mp598OwjBQmjcU30XorJvQorX802ri1ym plv+v6z0S7cqQOUVu4bely8= X-Google-Smtp-Source: APiQypLBJ0Ojn+H+M4zXLd2h6O3Qn1v/mz8M/31Rl8ZQwZwIRs/dXgUqj4zfYLGdQFA2KwlZacf4yA== X-Received: by 2002:a37:bd45:: with SMTP id n66mr3665522qkf.108.1588953496643; Fri, 08 May 2020 08:58:16 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:4d17:b25e:8d9:2188? ([2601:184:4180:66e7:4d17:b25e:8d9:2188]) by smtp.gmail.com with ESMTPSA id 132sm1463253qkj.117.2020.05.08.08.58.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 May 2020 08:58:15 -0700 (PDT) Autocrypt: addr=clement.pitclaudel@gmail.com; prefer-encrypt=mutual; keydata= xsFNBFStGiEBEAC8eHa+DdcrVtDSwYoIgoUtMfRAan4bdLxZuNIASy6iFytCHNsKqfPkq8zD YV2+uMtbdcnjapE038nidEMItNhO04JdZ+PJ6jvJo1gW+XI4fM8uzkGZauwR+d3hEq6goFSp rIlSlaVf2g5q4OKxI754yqwz00++EZhZQMntzoKQVV9stJ5eQ+gxTT1ANr7wQKbjn/8PM/Cg hBZvYLhh+WsS0Ko5qZuWdsvUBLpprmCWkP4FpZ234/tWpdVID65nlHpu25+6ajIcxfCIK+dN 2br0wN1szTeQFG19cfr3jXEvwHmLQbQqCg4UH+2b7JpMGR2/KWjqRWfWVvZMPVeJdOsZHx53 k6HIbEhvFBHbmqCI6FAZQjkgzGGkrSD92+jeMYiCTxRKqq2hFZ6xqQ6pJdXD1TXcIYPEs7rA MwcNMj8g4e6vuI+2CjHyQQkyMPAEi8guNPnyfBb648f1lxj7JiJu/ehRghIP5u/kLOsHNCKG QgCT04sawBZYHqEVYni8oHlGJcdWGT5/UI4B+wn70eXvYSScZEaB+S2s/bD0cdlSpHY5Od3l tpRZTva+ydswlrz4fxbYF45s6rFpqVwBMfNv3gqhBFXbuiEEctcTSGqhHxxT4R+24Yn+ZSBa EfUbrKnVTUmV20k+57rghiVw2wpj8v7sn3QXt96HJ9ImY4JvuwARAQABzTNDbMOpbWVudCBQ aXQtLUNsYXVkZWwgPGNsZW1lbnQucGl0Y2xhdWRlbEBsaXZlLmNvbT7CwXsEEwECACUCGyMG CwkIBwM In-Reply-To: <83368aihcb.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179932 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6LfaAs7gB8cx7qxc2sgJpJct8Reo01iwb Content-Type: multipart/mixed; boundary="kTx4rVn2LfV54GeBAK39yGJPMj3RcWrAb"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= To: Eli Zaretskii Cc: drew.adams@oracle.com, 4911@debbugs.gnu.org, larsi@gnus.org Message-ID: <9044f24e-ca0e-2701-ad7a-0b241f2d69a4@gmail.com> Subject: Re: bug#4911: mouse-face property should merge face attributes, not replace References: <8452d0c8-afc3-bdb8-2c88-f66dc770c3c4@gmail.com> <0955d0dd-c4fe-4feb-b68b-0ed212ccf291@default> <35268628-9ef1-8dd2-ab93-05ca1cae06be@gmail.com> <83blne74mk.fsf@gnu.org> <83a72iij8l.fsf@gnu.org> <38d17eb2-ba5b-30a6-d9ac-ec18ee7d8fe9@gmail.com> <83368aihcb.fsf@gnu.org> In-Reply-To: <83368aihcb.fsf@gnu.org> --kTx4rVn2LfV54GeBAK39yGJPMj3RcWrAb Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 08/05/2020 11.20, Eli Zaretskii wrote: >> Cc: drew.adams@oracle.com, 4911@debbugs.gnu.org, larsi@gnus.org >> From: Cl=C3=A9ment Pit-Claudel >> 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. >=20 > 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 sp= an of text is covered by a mouse highlight; namely, we look for a range o= f 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? >=20 > 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= ? >=20 > 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 thi= s almost "for free" --kTx4rVn2LfV54GeBAK39yGJPMj3RcWrAb-- --6LfaAs7gB8cx7qxc2sgJpJct8Reo01iwb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElGa8adIcPra4Jxxu+qD5xOb3TCMFAl61gZUACgkQ+qD5xOb3 TCON1w/+Jlxfg0U/izTBV8ZYPGWAY8+4hDmGoiXKdVSFTBg4o/XBLJXxOvoGvaKC fRZqt3OaWTfCTBGNmwX1U6S26EMsrHrJJ8+szdZGC6KaZLPYXfIF6sv7b31P+Oh6 Ugq59eySWirEzIuHXdNz/kI+/S7eEKXmbXQwCchC+C44J3STHgKEtc31sJFoQC5k S0y4+AweU64/BJj0JLapwvGdOiBcOUmyZtG5282uIVrOtV3jLw4FAjfnhd84srOh ComPsGBrLyO9siGE/ey/S9PFBWOapWGLllnIuts4nLOrLpfyYZBCNUjbacbkFOG0 FTGxBgtaKFvfCJY/N2q6pbpWYa34Jv8uxTYVbBvd2GQWVPASL9mKLx1FA9L2BMsG lCUYAksOsoDVe4HtLDRCJE+M10L6a/J5b37nOcoUWk+4DqLLpQGlZmFJNEVPTpTQ gQ9CKsX3cVfuivDN7QaSBHQiYBTQEVLBC7QquSy8FRvCuwW/muJxHs7bGILuV2C+ SGg4REe1uYFJw9TOuNdMq8jxSie1wrJ87QqrtauPHVfYBZWO1NSy99b2yi1YQUeG jJNwZ9DJc2RZbgY8MtX6csKP29AXjmSx/pn12T+hVaunjmGi2TVaVX5OF/aRzVBX k1TTcPcHAVbvK08GWa5SM0/dRQRkDWTWKjNpMR/mOJrtraaB41c= =fgIA -----END PGP SIGNATURE----- --6LfaAs7gB8cx7qxc2sgJpJct8Reo01iwb--