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: Sat, 25 Apr 2020 17:22:46 -0400 Message-ID: <8452d0c8-afc3-bdb8-2c88-f66dc770c3c4@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zzpkaufEHasfNCebSRYIrYbl7jecRH7rC" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="67078"; 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: Lars Ingebrigtsen To: 4911@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 26 01:41:19 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 1jSUQA-000HLp-Nw for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Apr 2020 01:41:18 +0200 Original-Received: from localhost ([::1]:49090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSUQ9-0003FW-NC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Apr 2020 19:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51874) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSUPw-0003DO-CI for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 19:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSUPv-0007SU-L2 for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 19:41:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSUPv-0007Rs-8E for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 19:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSUPv-0004sm-6V for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 19:41:03 -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: Sat, 25 Apr 2020 23:41:03 +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.158785805218716 (code B ref 4911); Sat, 25 Apr 2020 23:41:03 +0000 Original-Received: (at 4911) by debbugs.gnu.org; 25 Apr 2020 23:40:52 +0000 Original-Received: from localhost ([127.0.0.1]:60562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSUPj-0004rn-4B for submit@debbugs.gnu.org; Sat, 25 Apr 2020 19:40:52 -0400 Original-Received: from mail-qk1-f174.google.com ([209.85.222.174]:41809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSSGF-0007hb-6Z for 4911@debbugs.gnu.org; Sat, 25 Apr 2020 17:22:55 -0400 Original-Received: by mail-qk1-f174.google.com with SMTP id n143so14139490qkn.8 for <4911@debbugs.gnu.org>; Sat, 25 Apr 2020 14:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:references:cc:autocrypt:subject:message-id:date:user-agent :mime-version:in-reply-to; bh=HC/B0bVkpcJBNfrdIwufZjZRIB5IYLUacsL6nt7DSmM=; b=Vn63GopncJAvFvvcHgSsU42B1TZ1kp0f5uJpvkgKFZrEj7o5ZPCYPDP/e+7RWb1hQR nNIgWjPQRx5aLLn3ljiUee/xoHziUj4w6T6BRVZbyIzB6vblfC/BjQmUaSagAPlfk2OU 9RhQlqjUFlOITmDd5peQ8f+mxT77M3S/ZVO1TEjcBJL/zoaUo8GJKzIDZychvOZ0IDso zOWLMklFItwclnn1bhBKt6EVJBVQgBtDEYCpGBIdXoTkJHu/enMSjhS3u7Y0wh6jjpkl 2cn+Ys5A9Z4kygsmChDEJp+8DvBJ4+lvJX7JeWsmGM3J643+4UmrR6XyqljpKEPxq0v4 e1tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:cc:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to; bh=HC/B0bVkpcJBNfrdIwufZjZRIB5IYLUacsL6nt7DSmM=; b=IKwAu/t3SiY4yvvjiPj7IKgPzjPfny/uOITEjpDTQDZWewyjLNV6DZqkeBJocUX6M3 /ECY7ENmf58dDR/gebZywCQ2Tuk2sj8MS0k0Sfr1eo+oGgAzRoI7yq6iSP7/P6TtAZd1 mTHnnc5L9tdjqVDR/cGlSmvb6eSwAZXwfWu04T5hP8TvGtWeqFyIRrIzLcDO7f25oAn/ VSkKJ0rvkd9N5CnEg5RnRBdZgaQ06yVF2MTK1xEtqcYchxAdvDmV+a6itDIrFolQKssa aPhKh5xZkm7Hfeap2FBqfl/zt/ReagpsMvPuYnia3ra6jUOQ1xpacxPDDeuoCLGEoU10 BWag== X-Gm-Message-State: AGi0PuYzZyjAYgg8HWGtDN+nt9q4RvJswE/n0o/Z2jCN33lPzsHMa3GJ 0Dd0HOifVoeCxrDYWq84LlY= X-Google-Smtp-Source: APiQypJQWNwUrWm1xNNNtAfNDOsZBlAx1vw5eTBNER26EY8VbX4vo0sovwLGtLkYSbhC0yySBg8GNw== X-Received: by 2002:ae9:f507:: with SMTP id o7mr14891790qkg.262.1587849769245; Sat, 25 Apr 2020 14:22:49 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:54d6:bfeb:aa49:9d3b? ([2601:184:4180:66e7:54d6:bfeb:aa49:9d3b]) by smtp.gmail.com with ESMTPSA id m7sm6476018qke.124.2020.04.25.14.22.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Apr 2020 14:22:48 -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: X-Mailman-Approved-At: Sat, 25 Apr 2020 19:40:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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:179042 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --zzpkaufEHasfNCebSRYIrYbl7jecRH7rC Content-Type: multipart/mixed; boundary="S8RSlkW2hP7ScOtjnwGowelH7hC1YhHsj"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= To: 4911@debbugs.gnu.org Cc: Drew Adams , Lars Ingebrigtsen Message-ID: <8452d0c8-afc3-bdb8-2c88-f66dc770c3c4@gmail.com> Subject: Re: mouse-face property should merge face attributes, not replace References: In-Reply-To: --S8RSlkW2hP7ScOtjnwGowelH7hC1YhHsj Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable I hadn't seen Drew's earlier reply when I reopened the bug report, so her= e is a reply to Drew's message: Drew asked: > Why would one suppose that someone wants to merge that face with=20 > `mouse-face'? There's no need to suppose: users complained. But to some extent it makes sense, since that's how links behave on the w= eb (merging faces), so it's hart to fault users for having the same expec= tation in Emacs. > Just what is the motivation, besides someone feeling the behavior is=20 > "ugly"? The motivation for the original report was that our users were complainin= g to the PG, so it *was* in fact just "'omeone feeling the behavior is "u= gly"'. I think it would help to understand what the motivation is for erasing ex= isting faces when applying the mouse face. Drew, what does this behavior= improve for you? As a concrete example, when I use M-x compile, for example, each error an= d warning is highlighted. Hovering with the mouse over an error removes = the highlighting. Why is that helpful? (Besides, as I wrote in my previous email, merging faces would be optiona= l, since it would be easy to set a mouse-face to inherit from 'default an= d therefore completely remove existing highlighting). > And merging could, at least in some cases, make noticing the link=20 > etc. difficult. I didn't understand this part. In which cases would merging the mouse fa= ce with the underlying face *when the mouse is over the link* make notici= ng the link harder? When the mouse is over the link, the cursor typicall= y changes shape; and, while the mouse was not over the link, it typically= had separate highlighting. Why would merging faces when the mouse is ov= er the link make the link harder to notice? Also, I noticed that Eli wrote: > The use case described in the bug > report could be handled by using some non-color attribute for the > mouse-face, for example. The original report said that "Users complain that when the mouse is over= a region the normal fontification is obliterated."; why would it help to= use a non-color attribute? The normal fontification would still be obli= terated. Cheers, Cl=C3=A9ment. On 10/04/2020 12.26, Cl=C3=A9ment Pit-Claudel wrote: > Lars Ingebrigtsen gnus.org> writes: >> Eli Zaretskii gnu.org> writes: >> >>> I see no reason to change that now. The use case described in the bu= g >>> report could be handled by using some non-color attribute for the >>> mouse-face, for example. >> >> Seems like everybody agrees, so I'm closing this bug report. >=20 > I'd like to disagree :) This is a problem I've run into in various pack= ages and as a user, and the workaround doesn't work when there are multip= le different faces applied to the text of a link. >=20 > As a concrete example, consider compilation-mode, which uses different = colors for the file name, the line number, the column number, and the err= or message. Currently, when hovering over a compilation-mode line highli= ghts it, but also causes it to lose all of its other highlighting. >=20 > Setting different mouse-face properties to match the different faces wo= uld cause the mouse-face highlighting to be only applied to part of the l= ine. >=20 > Of course, one way to go is to handle mouse-in and mouse-out events in = Lisp, creating and removing overlays as needed. But that's explicitly re= commended against in the ELisp manual, and it's a lot of work for not muc= h gain. >=20 > It would be great to have an option for this; maybe as an extra text pr= operty, like 'mouse-face-merge? Or maybe as a user option? > Of course, if the default changed to merging, recovering the current be= havior would be easy even without an extra property (it would just be a m= atter of making the mouse-face inherit from 'default), I think. But even= without changing the default it would be nice to introduce a way to achi= eve that behavior. >=20 > Cl=C3=A9ment. >=20 --S8RSlkW2hP7ScOtjnwGowelH7hC1YhHsj-- --zzpkaufEHasfNCebSRYIrYbl7jecRH7rC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElGa8adIcPra4Jxxu+qD5xOb3TCMFAl6kqiYACgkQ+qD5xOb3 TCOsUA//Uce8fPMEkMuxhsYz3FY3gFSenq+Ivp63pUa5bnAfKtf37rMYhOqVdP0z v2kc4UMgyhR9oQXgeUwKzRB+ln9M3KgXqOK3Ehg6D1rnKGCbQjqmWbBHC1DBhvU9 ud8c69k39Z7YIGl26jeK7WJKiPmfQo4/7954ZQ2xYS7kUwtrNMZiEnBN0yHsupEE GAHfYuKBSyX8qeDCRaoSdYW5zmpOEv7BnFgKHLL+WHIdq63jtvM9RCuxX6PEBQ9D j+/vvDJ+1P8mHGRz+0HejWxtRD6ZCy9ei2bRnXCGLvuPVhUQFkYOIH++EjZAAO1L X6WgCBoqsdatMiM9jWOy7hOb6iKg5IjOdm8JpxzeiCOopXB/p50sWWlokManIW4V qa/EvdCFSfVlc698/E2o97HahfFr552WhFX2aaWxXh/V0Z1n+khu/HgFWVfTY+EO pF8r56gEjWDu75DGbU/nlLTgc/N1UdmfD6J9qkmBEfLZUeagSN4P9+ecvK7UUeco 464lFqjlJhXGx7IUkghQbhL9N921iqbqPj5/bvkKLzMN7WmAXJuYDqnf9RWDhWyT 3t/BJheEaxwmob3MubWWzq7TFXrB9ht5wchjfAzpL/kDcR7tVN78JbrbxvNtNptA 79D0nLR8KAEMJK9xWWP1G80qLP5ctN9PEEbcmOOtEcaMGhinc0k= =zNE/ -----END PGP SIGNATURE----- --zzpkaufEHasfNCebSRYIrYbl7jecRH7rC--