From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42552: 28.0.50; Overlay 'face' property doesn't set the "underlying face" for 'after-string' Date: Fri, 07 Aug 2020 08:42:12 +0300 Message-ID: <837dub811n.fsf@gnu.org> References: <46466541-6185-2bf3-87cc-b28c71fe69e7@yandex.ru> <838sf6gkvq.fsf@gnu.org> <83wo2ldrqb.fsf@gnu.org> <831rknbwb9.fsf@gnu.org> <831rkl9m1e.fsf@gnu.org> <7e9af86a-961e-8afd-0d62-0a1c79b96b40@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42552@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 07 07:43:12 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 1k3v9r-0001oK-Km for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Aug 2020 07:43:11 +0200 Original-Received: from localhost ([::1]:45632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3v9q-0002p3-EN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Aug 2020 01:43:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3v9i-0002n6-0r for bug-gnu-emacs@gnu.org; Fri, 07 Aug 2020 01:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3v9h-0000nF-NR for bug-gnu-emacs@gnu.org; Fri, 07 Aug 2020 01:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k3v9h-0001fj-M0 for bug-gnu-emacs@gnu.org; Fri, 07 Aug 2020 01:43:01 -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, 07 Aug 2020 05:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42552 X-GNU-PR-Package: emacs Original-Received: via spool by 42552-submit@debbugs.gnu.org id=B42552.15967789476380 (code B ref 42552); Fri, 07 Aug 2020 05:43:01 +0000 Original-Received: (at 42552) by debbugs.gnu.org; 7 Aug 2020 05:42:27 +0000 Original-Received: from localhost ([127.0.0.1]:55474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3v98-0001eq-VE for submit@debbugs.gnu.org; Fri, 07 Aug 2020 01:42:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3v95-0001eb-TL for 42552@debbugs.gnu.org; Fri, 07 Aug 2020 01:42:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36456) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3v90-0000kw-4h; Fri, 07 Aug 2020 01:42:18 -0400 Original-Received: from [176.228.60.248] (port=1480 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k3v8z-00050S-Hy; Fri, 07 Aug 2020 01:42:17 -0400 In-Reply-To: <7e9af86a-961e-8afd-0d62-0a1c79b96b40@yandex.ru> (message from Dmitry Gutov on Fri, 7 Aug 2020 02:16:12 +0300) 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:184225 Archived-At: > Cc: 42552@debbugs.gnu.org > From: Dmitry Gutov > Date: Fri, 7 Aug 2020 02:16:12 +0300 > > On 05.08.2020 17:58, Eli Zaretskii wrote: > > >> Should the "overlay string" obey the underlying face, though? It doesn't > >> obey the 'face' property, like you explained. Seems inconsistent. > > > > Emacs always worked this way, so changing it now is probably a big > > deal. AFAIU, the reason for this behavior is so that overlay strings > > which specify no faces use the same face as the surrounding text. > > Which sounds reasonable. > > Do you imagine creating a better consistency the other way (by having > the 'face' property affect overlay strings) would be as likely to create > problems? That's largely orthogonal, as most overlays don't specify 'face' AFAIK. But yes, this could also be a problem after so many years of disregarding it. If we really want something like that, perhaps a separate new property (like 'overriding-face') would be a better way. > >> But it should obey :extend set to nil, shouldn't it? > > > > It does, but :extend nil doesn't override :extend t, it just says that > > the face with a nil :extend attribute should not be considered when > > computing the face for the empty space past EOL. > > BTW, are there other attributes with a similar property? Perhaps not, I haven't checked. > For example, I find that I have to add (:inverse-video nil) > explicitly to the computed face which would be appended to the > overlay string's 'face' properties. > > Otherwise, the newlines are still "extended" with the "inverse video" > effect. Try this for an example: > > 1. Eval: > > (with-silent-modifications > (insert (propertize "abc" > 'font-lock-face > '((:background "green" :extend t) > default > ( :inverse-video t > :foreground "yellow" > :extend t))))) > > 2. C-j > > The "extended" newline is yellow. That's expected due to face-merging, no? > I'll try to implement this all as suggested, and will come back after. Should we close this bug or keep it open?