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 10:32:20 -0700 (PDT) Message-ID: References: <<<87tvyrabkk.fsf@gmail.com>>> <<<838tg3b27v.fsf@gnu.org>> > <<837evnazze.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 1508693606 2773 195.159.176.226 (22 Oct 2017 17:33:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Oct 2017 17:33:26 +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 19:33:20 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 1e6K7b-0007TN-LV for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 19:33:11 +0200 Original-Received: from localhost ([::1]:33745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6K7j-0000Ej-1P for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 13:33:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6K6x-00005Z-Cf for help-gnu-emacs@gnu.org; Sun, 22 Oct 2017 13:32:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6K6w-0003er-Hu for help-gnu-emacs@gnu.org; Sun, 22 Oct 2017 13:32:31 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:44073) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6K6q-0003cG-VY; Sun, 22 Oct 2017 13:32:25 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9MHWMbl017606 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Oct 2017 17:32:23 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v9MHWLVc016136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Oct 2017 17:32:22 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9MHWLsI019966; Sun, 22 Oct 2017 17:32:21 GMT In-Reply-To: <<837evnazze.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: 156.151.31.81 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:114607 Archived-At: > > 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. >=20 > It's indirectly documented in "Displaying Faces". OK. The margin-spec `display' property is applied in this case to a zero-length buffer zone. And a margin-spec `display' property is of type "replacing", so the text in that zone is not shown (which has no effect, since the zone is empty). What you say makes sense: face `hl-line-face' is used for an overlay that covers the empty zone in question, so that face is active there, so it is visible for the margin-spec `display' overlay. Still, I don't think this behavior is obvious, from the doc. I'm not sure where it should be pointed out, but I think it would help to do so, even if it does follow from what is written now. Perhaps point this out explicitly in node `Displaying Faces'. And perhaps xref that node from node `Display Margins', since a margin spec is a likely gotcha candidate). > Not a bug: the code does this on purpose, and even has comments that > explicitly describe this. Emacs worked like that since v21.1. Code comments are one way to make the design and behavior clear. The Elisp manual is another way - a better way to get across something like this to most users. Thank you for the explanation. Please consider improving the doc to make this behavior clearer.