From unknown Sun Jun 22 04:25:48 2025 X-Loop: don@donarmstrong.com Subject: bug#1222: overlay display inherits face properties from buffer Reply-To: Glenn Morris , 1222-quiet@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: Resent-Date: Wed, 22 Oct 2008 01:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1222 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by quiet@emacsbugs.donarmstrong.com id=Q.122463724032643 (code Q ref -1); Wed, 22 Oct 2008 01:10:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-13.8 required=4.0 tests=AWL,BAYES_00,HAS_PACKAGE, RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at quiet) by emacsbugs.donarmstrong.com; 22 Oct 2008 01:00:40 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9M10cOW032637 for ; Tue, 21 Oct 2008 18:00:39 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KsS2u-0007tE-UY; Tue, 21 Oct 2008 20:57:56 -0400 From: Glenn Morris To: quiet@debbugs.gnu.org X-Spook: Noriega AIEWS Sundevil ASIO KGB Mossad world domination X-Ran: MnP2yO_PrL=de#BQS0*H4EGWK6]Dc&AtwwF&9NAz+T,-@tiUncno6hFCu9ppWqP%tTRkc? X-Hue: white X-Attribution: GM Date: Tue, 21 Oct 2008 20:57:56 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Package: emacs Version: 23.0.60 Severity: minor This bug is extracted from #1176, which contained several issues. The display property of an overlay inherits face properties from the following buffer text. The workaround is to fully specify the face properties of the display text. Example: (let ((buff (generate-new-buffer "overlay test")) o) (with-current-buffer buff (insert (propertize "text" 'face '(:background "red"))) (setq o (make-overlay (point-min) (point-max))) (overlay-put o 'display "display") ;;; (overlay-put o 'display (propertize "display" 'face 'default)) (pop-to-buffer buff))) "display" has a red background. The commented out part shows the workaround. From unknown Sun Jun 22 04:25:48 2025 X-Loop: don@donarmstrong.com Subject: bug#1222: overlay display inherits face properties from buffer Reply-To: Glenn Morris , 1222-quiet@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: Resent-Date: Wed, 22 Oct 2008 01:20:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1222 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1222-quiet@emacsbugs.donarmstrong.com id=Q1222.12246379903356 (code Q ref 1222); Wed, 22 Oct 2008 01:20:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-11.3 required=4.0 tests=AWL,BAYES_00,FAKE_REPLY_C, HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1222-quiet) by emacsbugs.donarmstrong.com; 22 Oct 2008 01:13:10 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9M1D72g003349 for <1222-quiet@emacsbugs.donarmstrong.com>; Tue, 21 Oct 2008 18:13:08 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KsSF0-0008K6-E9; Tue, 21 Oct 2008 21:10:26 -0400 From: Glenn Morris To: 1222-quiet@debbugs.gnu.org X-Spook: Honduras doctrine CISU Commecen sniper beanpole ASLET SDI X-Ran: r,'~LykiqVD[S=od}/pg-:eIUnvb4ybePe#_0(}NQNfs3}NUY@ikyoEL[@.>#6#O(9okxb X-Hue: yellow X-Attribution: GM Date: Tue, 21 Oct 2008 21:10:26 -0400 Message-ID: <1wbpxd5ta5.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii This issue also affects before- and after-strings, albeit in slightly different ways: Example: (let ((buff (generate-new-buffer "overlay test")) o) (with-current-buffer buff (insert (propertize "text" 'face '(:background "red"))) (setq o (make-overlay (point-min) (point-max))) (overlay-put o 'display "display") (overlay-put o 'before-string "before-string") (overlay-put o 'after-string "after-string") (insert (propertize "more" 'face '(:background "green"))) (pop-to-buffer buff))) "before-string" and "display" have a red background, "after-string" has a green background. Ideally, face properties should not be inherited from the buffer in this way. From unknown Sun Jun 22 04:25:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1222: overlay display inherits face properties from buffer Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2019 07:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1222 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 1222@debbugs.gnu.org Received: via spool by 1222-submit@debbugs.gnu.org id=B1222.156982688426224 (code B ref 1222); Mon, 30 Sep 2019 07:02:02 +0000 Received: (at 1222) by debbugs.gnu.org; 30 Sep 2019 07:01:24 +0000 Received: from localhost ([127.0.0.1]:56662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEpgR-0006ou-OT for submit@debbugs.gnu.org; Mon, 30 Sep 2019 03:01:23 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEpgM-0006od-Tn for 1222@debbugs.gnu.org; Mon, 30 Sep 2019 03:01:19 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEpgH-0004Ld-PF; Mon, 30 Sep 2019 09:01:18 +0200 From: Lars Ingebrigtsen References: <1wbpxd5ta5.fsf@fencepost.gnu.org> Date: Mon, 30 Sep 2019 09:01:13 +0200 In-Reply-To: <1wbpxd5ta5.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 21 Oct 2008 21:10:26 -0400") Message-ID: <87a7amjmiu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Glenn Morris writes: > This issue also affects before- and after-strings, albeit in slightly > different ways: > > Example: > > (let ((buff (generate-new-buffer "overlay test")) > o) > (with-current-buffer buff > (insert [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Glenn Morris writes: > This issue also affects before- and after-strings, albeit in slightly > different ways: > > Example: > > (let ((buff (generate-new-buffer "overlay test")) > o) > (with-current-buffer buff > (insert (propertize "text" 'face '(:background "red"))) > (setq o (make-overlay (point-min) (point-max))) > (overlay-put o 'display "display") > (overlay-put o 'before-string "before-string") > (overlay-put o 'after-string "after-string") > (insert (propertize "more" 'face '(:background "green"))) > (pop-to-buffer buff))) > > "before-string" and "display" have a red background, "after-string" > has a green background. > > Ideally, face properties should not be inherited from the buffer in > this way. Hm... is this the same as bug#25348? If so, it was decided there that this was behaviour as designed, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:25:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#1222: overlay display inherits face properties from buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2019 07:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1222 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: rgm@gnu.org, 1222@debbugs.gnu.org Received: via spool by 1222-submit@debbugs.gnu.org id=B1222.156982950314895 (code B ref 1222); Mon, 30 Sep 2019 07:46:01 +0000 Received: (at 1222) by debbugs.gnu.org; 30 Sep 2019 07:45:03 +0000 Received: from localhost ([127.0.0.1]:56800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEqMg-0003rp-0y for submit@debbugs.gnu.org; Mon, 30 Sep 2019 03:45:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEqMd-0003r9-O8; Mon, 30 Sep 2019 03:45:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iEqMY-00030m-IB; Mon, 30 Sep 2019 03:44:54 -0400 Received: from [176.228.60.248] (port=1054 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iEqMX-0003lC-C4; Mon, 30 Sep 2019 03:44:53 -0400 Date: Mon, 30 Sep 2019 10:44:50 +0300 Message-Id: <83zhimcjnx.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87a7amjmiu.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 30 Sep 2019 09:01:13 +0200) References: <1wbpxd5ta5.fsf@fencepost.gnu.org> <87a7amjmiu.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 1222 notabug thanks > From: Lars Ingebrigtsen > Date: Mon, 30 Sep 2019 09:01:13 +0200 > Cc: 1222@debbugs.gnu.org > > Glenn Morris writes: > > > This issue also affects before- and after-strings, albeit in slightly > > different ways: > > > > Example: > > > > (let ((buff (generate-new-buffer "overlay test")) > > o) > > (with-current-buffer buff > > (insert (propertize "text" 'face '(:background "red"))) > > (setq o (make-overlay (point-min) (point-max))) > > (overlay-put o 'display "display") > > (overlay-put o 'before-string "before-string") > > (overlay-put o 'after-string "after-string") > > (insert (propertize "more" 'face '(:background "green"))) > > (pop-to-buffer buff))) > > > > "before-string" and "display" have a red background, "after-string" > > has a green background. > > > > Ideally, face properties should not be inherited from the buffer in > > this way. > > Hm... is this the same as bug#25348? If so, it was decided there that > this was behaviour as designed, I think. No, it isn't related to bug#25348. But it's "as designed" nonetheless: the display engine always merges all the sources of the face information relevant to the current buffer position. This is documented in the ELisp manual, see the beginning of the node "Displaying Faces" (I believe this wasn't documented at the time this bug was filed). IOW, what is reported here is the expected behavior, that's how the code was designed and implemented. P.S. The original report says "inherits face properties from the following buffer text", but the "following" part is only accurate when referring to how text appears on display. The Lisp code in the report clearly puts the red background on the text "covered" by the overlay, so that background affects the buffer position(s) where the overlay is set up. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 03:46:39 2019 Received: (at control) by debbugs.gnu.org; 30 Sep 2019 07:46:40 +0000 Received: from localhost ([127.0.0.1]:56814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEqOF-0005O6-Fn for submit@debbugs.gnu.org; Mon, 30 Sep 2019 03:46:39 -0400 Received: from quimby.gnus.org ([80.91.231.51]:46690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEqOC-0005Lc-Rk for control@debbugs.gnu.org; Mon, 30 Sep 2019 03:46:38 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEqOA-0004tW-6X for control@debbugs.gnu.org; Mon, 30 Sep 2019 09:46:36 +0200 Date: Mon, 30 Sep 2019 09:46:33 +0200 Message-Id: <87tv8ufcpy.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #1222 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 1222 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 1222 quit