From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25348: `display` property faces are prioritized above overlays Date: Wed, 04 Jan 2017 18:06:31 +0200 Message-ID: <83vatuernc.fsf@gnu.org> References: <3385c032-ead0-4890-8cf4-e54375ea8ac7@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1483546039 23553 195.159.176.226 (4 Jan 2017 16:07:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2017 16:07:19 +0000 (UTC) Cc: 25348@debbugs.gnu.org To: Travis Foster Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 04 17:07:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOo5l-0004z0-Ej for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jan 2017 17:07:09 +0100 Original-Received: from localhost ([::1]:40160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOo5p-0008NA-GM for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jan 2017 11:07:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOo5i-0008Mt-V2 for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 11:07:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOo5e-0001xj-1U for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 11:07:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54140) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cOo5d-0001xf-UL for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 11:07:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cOo5d-00088n-N3 for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 11:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Jan 2017 16:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25348-submit@debbugs.gnu.org id=B25348.148354599031254 (code B ref 25348); Wed, 04 Jan 2017 16:07:01 +0000 Original-Received: (at 25348) by debbugs.gnu.org; 4 Jan 2017 16:06:30 +0000 Original-Received: from localhost ([127.0.0.1]:41306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOo58-000882-AM for submit@debbugs.gnu.org; Wed, 04 Jan 2017 11:06:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOo57-00087k-9r for 25348@debbugs.gnu.org; Wed, 04 Jan 2017 11:06:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOo4x-0001V3-Dd for 25348@debbugs.gnu.org; Wed, 04 Jan 2017 11:06:24 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOo4x-0001Uo-As; Wed, 04 Jan 2017 11:06:19 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3323 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cOo4w-0005bm-Hh; Wed, 04 Jan 2017 11:06:18 -0500 In-reply-to: (message from Travis Foster on Tue, 3 Jan 2017 14:52:26 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127739 Archived-At: > From: Travis Foster > Date: Tue, 3 Jan 2017 14:52:26 -0800 > > Yes, the text in the buffer is replaced by its display text, with the face. Then, I would expect the overlay to apply > to all the text on the line, including the replacement text. Since the properties in overlays are supposed to take > priority over the properties in the buffer itself, I don't think it makes sense for the replacement to take priority > over the overlay. Is that wrong? Drew is right: the priority of overlays over text properties only comes into play when both text properties and overlays are set on the same region of text. In your case, the 'face' property is put on a display string, whereas the hl-line overlay is on buffer text. So priority considerations don't apply here. > It seems that the replacement should occur, and then the resulting > text should be modified further by the overlay. Emacs uses the face from the overlay only for text to which this overlay is applied. The display string is therefore using its own face definitions, which completely override those from the hl-line overlay. If you define a face for the display string that only specifies a foreground color, then Emacs will use the hl-line overlay for the background color. This is normal operation of the Emacs display engine, it has been like that since Emacs 21. IOW, this is not a bug.