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: Mon, 4 May 2020 11:16:05 -0400 Message-ID: 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wRvxBRQGXQxesL8irUG4RLyKazWVOmtCU" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="104433"; 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 Mon May 04 17:18:08 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 1jVcr9-000R3m-08 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 May 2020 17:18:07 +0200 Original-Received: from localhost ([::1]:57198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVcr7-0007Yi-Rj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 May 2020 11:18:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVcq6-0005w8-Pj for bug-gnu-emacs@gnu.org; Mon, 04 May 2020 11:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVcq6-0000Lx-EQ for bug-gnu-emacs@gnu.org; Mon, 04 May 2020 11:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVcq6-0002ah-AX for bug-gnu-emacs@gnu.org; Mon, 04 May 2020 11:17:02 -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: Mon, 04 May 2020 15:17:02 +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.15886053759896 (code B ref 4911); Mon, 04 May 2020 15:17:02 +0000 Original-Received: (at 4911) by debbugs.gnu.org; 4 May 2020 15:16:15 +0000 Original-Received: from localhost ([127.0.0.1]:33718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVcpL-0002ZY-6K for submit@debbugs.gnu.org; Mon, 04 May 2020 11:16:15 -0400 Original-Received: from mail-qt1-f171.google.com ([209.85.160.171]:38122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVcpJ-0002ZL-LU for 4911@debbugs.gnu.org; Mon, 04 May 2020 11:16:14 -0400 Original-Received: by mail-qt1-f171.google.com with SMTP id i68so14265929qtb.5 for <4911@debbugs.gnu.org>; Mon, 04 May 2020 08:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:references:from:autocrypt:subject:message-id:date:user-agent :mime-version:in-reply-to; bh=8tKA3y6xuAkT9SgAYr+kFnaruNaxvGIl2gDlErhaMdM=; b=j67FbLLGnuvtRWGcg2vvym21j6u9l6LIIteW5hdO8IwhpZ39d2hip4QEyxX7Fwe8Vi P6KnuchfYW9C/pgXaibPdTMnTxWbmTpFk5LftpnlmHX4QgqOwq7Ch6D5X5YNGq+RhnuQ JdTuI4+MEaQweF8f6QMqt7+itmEkhNWbBSLqIqMoGj23J+ZQaxIMtmqN9pG5yMk2ktZz g+eZ+wQpMVsq7HRoU/jrIe9dU6BwHwrBhNoPE6MKdOJw5ZsCddmev7CAPW7k5VW2Zgkk c+D3opVCeJ6F6hpmTBD8vgqWWkT442rYnwFxpSvUpZCqa3f6x9Ezxf4D9EMQ0cz2S4wu f3zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to; bh=8tKA3y6xuAkT9SgAYr+kFnaruNaxvGIl2gDlErhaMdM=; b=DzJA7aRRp/n5ftZ2aUdyHzOvp0rQKdZjvNXsFfLGK4eaYe2GIEuPHsiTg9xDKD/qdv qaDRsEmWJpS6Uuskh4f7zuuMtpdmPxyYV939XyqE/FOB/sNqt+tNSbcIkp9UaJun+IJR B1Fb8cft2bhfrCGjym7w/Z+ph+WlU/qQHKeHpUzMlXHXh/6d0tgbDlzs0PaL7QLgKEVL dGcpt8mmfMTYnpX+Uq2ibtTh7Flh9DStqXprNw2ZR9YmBlu5ubRlXpFP/mMmBwGoXNyV wpruuQZaGI0rX4FUXATh+JOVWCMnnY2HBPvCr5UfCeE23yBiVHQfuFsrPZbJMe7YS14o v56Q== X-Gm-Message-State: AGi0PuafO/DWIUPLtXwuKRZDiTVgiimnsE9/cqMhMzVO8SUGMZMpxcaO 4IZJvkXxMyD0cbwSBPQtBLc= X-Google-Smtp-Source: APiQypKHRLHnq07kHzkwQqfE6jyDl0rlymt736t2zrXH9EnXmcF0V75a6Und99U3ikjArUdbm2nKcg== X-Received: by 2002:ac8:70c:: with SMTP id g12mr17035353qth.71.1588605367993; Mon, 04 May 2020 08:16:07 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:4837:46bf:979:6a47? ([2601:184:4180:66e7:4837:46bf:979:6a47]) by smtp.gmail.com with ESMTPSA id g187sm9938944qkf.115.2020.05.04.08.16.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2020 08:16:06 -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: <83blne74mk.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:179688 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wRvxBRQGXQxesL8irUG4RLyKazWVOmtCU Content-Type: multipart/mixed; boundary="NWAkGTzbQv9KcA9YrHH9triXk7Rb4e1kA"; 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: 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> In-Reply-To: <83blne74mk.fsf@gnu.org> --NWAkGTzbQv9KcA9YrHH9triXk7Rb4e1kA Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 26/04/2020 09.34, Eli Zaretskii wrote: > If someone wants to work on an option whereby we will merge the mouse > face with the face of each highlighted character, that would be=20 > welcome. I just want to warn volunteers that providing such a=20 > feature is not going to be simple: the way mouse-highlight is=20 > currently implemented we simply redraw a stretch of glyphs on the=20 > screen with a face that is already "realized" and cached (see=20 > xfaces.c). Which means face merging has been already done, and we=20 > can only use the existing faces which were merged long ago. Making=20 > this new feature happen would then require reimplementing=20 > mouse-highlight similar to the region (some kind of overlay) Thanks a lot, this summary was very useful. I've been pondering this issue since your last message, hoping to find a = way to keep the complexity down and not introduce flickering. Currently we cache a single realized mouse_face. Could we cache a sequen= ce of such realized faces instead, attached to regions of text? That is,= we'd compute the realized mouse-face for all regions of the current span= , and cache that. Concretely, I guess this would mean enhancing Mouse_HL= Info to keep a list of spans instead of a single one. Cl=C3=A9ment. --NWAkGTzbQv9KcA9YrHH9triXk7Rb4e1kA-- --wRvxBRQGXQxesL8irUG4RLyKazWVOmtCU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElGa8adIcPra4Jxxu+qD5xOb3TCMFAl6wMbUACgkQ+qD5xOb3 TCNL6A/9H9d02J7tn0zo2lPVlgtm7Tiyi5A8T25wcDlAaMY0svgfpSFAaAnuSWr6 lE9RFCAjFT8sIx1y+2hSCpV8ZGyMRLpsAjZwMmrBcAw5lB1FhJu0p8JCgk1Ex8xa XRmgNOEzVPRkt9ZRkH4XEaH+3UDIA6qeTFjWtRSkW+XJyEf7nF5+fMkw0ODHRzcT cZlZrSrzPd74AGwYlaO9lgjhzOpDdhnkvGv3s4d+koLDe2yWf29ZyS+ll6qxfE7m OjenHydZvldhcNQ5Yd39/ntvb716vLDr4K1azGzswJqVAHPfr2Y5dEM6jg03VjZW L9YsiNVxyM5cS4piMVQ9rPqHzd45NgT2gDnTD5leNje7uIQlRtJnAAF3E7nVLdUL ZrItIcRPdVLBiLzb910IElVo2ek8XeV4GjaocJLF08WoTO9gkhmw526hxP/BBw3k qxaWsMmscBV1oBAiduCIh5itZ0/WxpK8aZed961KteXqJurwu0WjQFCDz+GKs6TC OzZxEuF+0h872Bk8u3DXSs5D9me5buFZN43eGwpVlglVx8KgLqft61J1Rq7mq8ne /rXINjgRjDHxOM1Ng+EBgiQ2pe+Y9S2KWuPKgRk2PE3P+gLyrsjONzJrxeJc7GV1 p0m8Q1kJeSkYRRhOrnLPZQDvzY0JkafJC3csUoUo33CUHULWoSU= =J/zx -----END PGP SIGNATURE----- --wRvxBRQGXQxesL8irUG4RLyKazWVOmtCU--