From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#4911: mouse-face property should merge face attributes, not replace Date: Sun, 26 Apr 2020 16:34:11 +0300 Message-ID: <83blne74mk.fsf@gnu.org> References: <8452d0c8-afc3-bdb8-2c88-f66dc770c3c4@gmail.com> <0955d0dd-c4fe-4feb-b68b-0ed212ccf291@default> <35268628-9ef1-8dd2-ab93-05ca1cae06be@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 4911@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 26 15:35:15 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 1jShRC-000VXb-Qh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Apr 2020 15:35:14 +0200 Original-Received: from localhost ([::1]:58958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jShRB-0004Fy-EL for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Apr 2020 09:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46746) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jShR1-0004FX-6j for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 09:35:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jShR0-0001LY-Qp for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 09:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jShR0-0001LR-Ed for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 09:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jShR0-00053H-AA for bug-gnu-emacs@gnu.org; Sun, 26 Apr 2020 09:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Apr 2020 13:35: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.158790806719371 (code B ref 4911); Sun, 26 Apr 2020 13:35:02 +0000 Original-Received: (at 4911) by debbugs.gnu.org; 26 Apr 2020 13:34:27 +0000 Original-Received: from localhost ([127.0.0.1]:32844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jShQR-00052M-CK for submit@debbugs.gnu.org; Sun, 26 Apr 2020 09:34:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jShQP-000524-Ko for 4911@debbugs.gnu.org; Sun, 26 Apr 2020 09:34:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43241) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jShQK-0000aR-37; Sun, 26 Apr 2020 09:34:20 -0400 Original-Received: from [176.228.60.248] (port=1785 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jShQJ-0002ya-IF; Sun, 26 Apr 2020 09:34:19 -0400 In-Reply-To: <35268628-9ef1-8dd2-ab93-05ca1cae06be@gmail.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel on Sat, 25 Apr 2020 23:10:42 -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:179061 Archived-At: > From: Clément Pit-Claudel > Date: Sat, 25 Apr 2020 23:10:42 -0400 > Cc: Lars Ingebrigtsen > > > Maybe Eli meant something like what I suggested above: > > adding an underline without changing the foreground > > and background colors of the text. Yes, that could > > be done by face merging (and yes, currently the normal > > fontification gets obliterated). > > I think that would be great. Maybe I misunderstood: I thought Eli was suggesting a workaround that worked with Emacs as it is (which would explain why Lars closed the bug), but indeed currently using an underline still removes other face properties. No, this cannot be done with the current display code, and I'm sorry I posted a confusing suggestion. 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 welcome. I just want to warn volunteers that providing such a feature is not going to be simple: the way mouse-highlight is currently implemented we simply redraw a stretch of glyphs on the screen with a face that is already "realized" and cached (see xfaces.c). Which means face merging has been already done, and we can only use the existing faces which were merged long ago. Making this new feature happen would then require reimplementing mouse-highlight similar to the region (some kind of overlay), and I hope the result will not cause annoying flicker, since in principle we will have to trigger redisplay on each mouse move, unlike a much simpler redraw we do now.