From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: How can I remove effects of text properties in 'before-string Date: Sun, 22 Oct 2017 09:33:08 -0700 (PDT) Message-ID: References: <<87tvyrabkk.fsf@gmail.com>> <<838tg3b27v.fsf@gnu.org>> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508690034 18602 195.159.176.226 (22 Oct 2017 16:33:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Oct 2017 16:33:54 +0000 (UTC) To: Eli Zaretskii , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 22 18:33:51 2017 Return-path: Envelope-to: geh-help-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 1e6JBy-0002vL-Gp for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 18:33:38 +0200 Original-Received: from localhost ([::1]:33563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6JC5-000376-OL for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 12:33:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6JBc-000370-PE for help-gnu-emacs@gnu.org; Sun, 22 Oct 2017 12:33:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6JBb-00041K-Vk for help-gnu-emacs@gnu.org; Sun, 22 Oct 2017 12:33:16 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:31974) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6JBY-0003zm-7w; Sun, 22 Oct 2017 12:33:12 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9MGXAHW024259 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Oct 2017 16:33:10 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v9MGXAvU002342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Oct 2017 16:33:10 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9MGX9Dl022850; Sun, 22 Oct 2017 16:33:10 GMT In-Reply-To: <<838tg3b27v.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114602 Archived-At: > > (set-window-margins (get-buffer-window) 20 0) > > (overlay-put (make-overlay (point) (point)) 'before-string > > (propertize "." 'display `((margin left-margin) ,"Hi there!"))) > > (hl-line-mode) > > > > The string "Hi there!" is also highlighted. How can I disable > > that? >=20 > Give the string a distinct face. Why doesn't it use the `default' face? If no `face' property is given to the string, why would the effective face be something different from `default'? Where in the doc do we say that this should use a face that is used in an overlay placed on some buffer positions? Is this behavior documented? I couldn't find anything about it, but it might well be there somewhere. I looked in the doc about overlays and the doc about the margin, but perhaps it is there and I overlooked or misread it. Or is this perhaps a bug? For what reason should the properties of an overlay on some parts of a buffer affect the appearance of the margin?