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#27103: Should show-trailing-whitespace highlight specified spaces? Date: Sat, 27 May 2017 21:26:14 +0300 Message-ID: <83poeugnqx.fsf@gnu.org> References: <8b0fc51c-288c-cf31-1054-07bd13ce91a0@live.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1495909635 29842 195.159.176.226 (27 May 2017 18:27:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 May 2017 18:27:15 +0000 (UTC) Cc: 27103@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 27 20:27:11 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 1dEgQe-0007Zl-Qs for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 May 2017 20:27:09 +0200 Original-Received: from localhost ([::1]:41683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEgQi-0003ke-Kt for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 May 2017 14:27:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEgQb-0003i5-LE for bug-gnu-emacs@gnu.org; Sat, 27 May 2017 14:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEgQY-00084I-Fz for bug-gnu-emacs@gnu.org; Sat, 27 May 2017 14:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38331) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dEgQY-00084E-Br for bug-gnu-emacs@gnu.org; Sat, 27 May 2017 14:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dEgQY-0005OZ-5O for bug-gnu-emacs@gnu.org; Sat, 27 May 2017 14:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2017 18:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27103 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27103-submit@debbugs.gnu.org id=B27103.149590959720707 (code B ref 27103); Sat, 27 May 2017 18:27:02 +0000 Original-Received: (at 27103) by debbugs.gnu.org; 27 May 2017 18:26:37 +0000 Original-Received: from localhost ([127.0.0.1]:41008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEgQ9-0005Nt-8L for submit@debbugs.gnu.org; Sat, 27 May 2017 14:26:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEgQ7-0005Nh-9g for 27103@debbugs.gnu.org; Sat, 27 May 2017 14:26:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEgPz-0007zz-5F for 27103@debbugs.gnu.org; Sat, 27 May 2017 14:26:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEgPq-0007yZ-A8; Sat, 27 May 2017 14:26:18 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3115 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dEgPp-0003uy-57; Sat, 27 May 2017 14:26:17 -0400 In-reply-to: <8b0fc51c-288c-cf31-1054-07bd13ce91a0@live.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel on Sat, 27 May 2017 12:47:40 -0400) 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:132932 Archived-At: tags 27103 notabug thanks > From: Clément Pit--Claudel > Date: Sat, 27 May 2017 12:47:40 -0400 > > I'm trying to display "/// " comment markers as a thin vertical line. At first, I went for something like the following font-lock rule: > > '(face my-vertical-line-face display (space :width 0.5)) > > This worked fine, until I decided to add a fringe icon, too: > > '(face my-vertical-line-face display [(space :width 0.5) (left-margin left-arrow)]) > > Now (with show-trailing-whitespace set to t) Emacs highlight lines that just contain "///" in bright red. Here's a quick way to reproduce this: > > (dotimes (_ 25) (insert (propertize "///" 'display '((space :width 10) (left-fringe left-arrow))) "\n")) > > Contrast with this, which doesn't show trailing-whitespace highlights: > > (dotimes (_ 25) (insert (propertize "///" 'display '(space :width 10)) "\n")) > > Am I doing something wrong? I think you are hitting on undefined behavior: mixing different replacing specs in the same display property is not generally supported. > Is there a way to disable the trailing whitespace highlighting here? You could swap the order of 'space' and 'left-fringe' specs, but the fact that this works is sheer luck, and I wouldn't recommend relying on that. The rule is to use at most one replacing spec in a display property.