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: Fri, 08 May 2020 18:20:20 +0300 Message-ID: <83368aihcb.fsf@gnu.org> 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> 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="50295"; 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 Fri May 08 17:33:48 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 1jX50W-000CyG-2f for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 17:33:48 +0200 Original-Received: from localhost ([::1]:58056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX50V-0006Md-2P for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 11:33:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX4oA-00023E-FC for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 11:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX4oA-0005Bo-5X for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 11:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jX4oA-0004Xa-1I for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 11:21: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: Fri, 08 May 2020 15:21: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.158895124217404 (code B ref 4911); Fri, 08 May 2020 15:21:01 +0000 Original-Received: (at 4911) by debbugs.gnu.org; 8 May 2020 15:20:42 +0000 Original-Received: from localhost ([127.0.0.1]:46112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX4np-0004We-I6 for submit@debbugs.gnu.org; Fri, 08 May 2020 11:20:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX4no-0004WS-6b for 4911@debbugs.gnu.org; Fri, 08 May 2020 11:20:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59383) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX4ng-0003r6-Ud; Fri, 08 May 2020 11:20:33 -0400 Original-Received: from [176.228.60.248] (port=4887 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jX4ng-0001n4-D8; Fri, 08 May 2020 11:20:32 -0400 In-Reply-To: <38d17eb2-ba5b-30a6-d9ac-ec18ee7d8fe9@gmail.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel on Fri, 8 May 2020 11:01:35 -0400) 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:179929 Archived-At: > Cc: drew.adams@oracle.com, 4911@debbugs.gnu.org, larsi@gnus.org > From: Clément 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. But if the underlying text has different face properties, the range of text should now be divided into different "spans", no? > > . 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. > > . recording the buffer positions to which those realized mouse-faces > > are relevant; and > > That makes sense. Basically, I was hoping to change Mouse_HLInfo to contain more than one range and more than one face. Maybe that, too, will have to be used. > > . 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.