From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21750: show-paren-mode erroneously highlights the left margin Date: Sun, 25 Oct 2015 20:37:28 +0200 Message-ID: <83y4eqdcbb.fsf@gnu.org> References: <83wpucuj2w.fsf@gnu.org> <83vb9wuicz.fsf@gnu.org> <87vb9wndad.fsf@gmx.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445798305 16520 80.91.229.3 (25 Oct 2015 18:38:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Oct 2015 18:38:25 +0000 (UTC) Cc: hinrik.sig@gmail.com, 21750@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 25 19:38:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZqQBI-0003CF-81 for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Oct 2015 19:38:12 +0100 Original-Received: from localhost ([::1]:49093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqQBH-0002bH-HY for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Oct 2015 14:38:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqQBD-0002b6-Lf for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2015 14:38:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqQB8-0002pT-IR for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2015 14:38:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqQB8-0002pM-Eu for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2015 14:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZqQB8-0001Rf-32 for bug-gnu-emacs@gnu.org; Sun, 25 Oct 2015 14:38: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: Sun, 25 Oct 2015 18:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21750 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21750-submit@debbugs.gnu.org id=B21750.14457982615523 (code B ref 21750); Sun, 25 Oct 2015 18:38:02 +0000 Original-Received: (at 21750) by debbugs.gnu.org; 25 Oct 2015 18:37:41 +0000 Original-Received: from localhost ([127.0.0.1]:38176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqQAm-0001R1-OK for submit@debbugs.gnu.org; Sun, 25 Oct 2015 14:37:41 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:35699) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqQAR-0001QY-K0 for 21750@debbugs.gnu.org; Sun, 25 Oct 2015 14:37:39 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NWS00L00GY5NG00@mtaout28.012.net.il> for 21750@debbugs.gnu.org; Sun, 25 Oct 2015 20:36:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWS00CW3H0L6PA0@mtaout28.012.net.il>; Sun, 25 Oct 2015 20:36:22 +0200 (IST) In-reply-to: <87vb9wndad.fsf@gmx.net> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108020 Archived-At: > From: Stephen Berman > Cc: hinrik.sig@gmail.com, 21750@debbugs.gnu.org > Date: Sat, 24 Oct 2015 23:54:02 +0200 > > >> I think this is a side effect of the general feature whereby an > >> overlay string "inherits" the face of the surrounding buffer text. > >> It doesn't matter whether the overlay string is displayed in the > >> window's display margin or in the text area. > > Is this clearly documented in the Emacs Lisp manual? If not, I think it > should be. Which part(s) of what I said you think should be clearly documented? The part about display/overlay strings using the face of the "underlying" text, or the fact that this applies to strings displayed on the display margins? > (The only places I found that mention overlays and faces > together are 37.9.2 Overlay Properties and 37.12.4 Displaying Faces, but > in neither is this effect of face inheritance clearly stated, AFAICS.) "Displaying Faces" is the place that should make it clear. It describes the order in which Emacs determines a face appropriate for displaying a given character, using the various possible sources. If something there is unclear or missing, please elaborate. (It is clear to me, but I'm not the typical reader of those parts, obviously ;-) > > You can work around this in this case if you modify your face > > customization as follows: > > > > (custom-set-faces > > '(linum ((t (:foreground "black" :background "white" :weight bold))))) > > > > IOW, don't let the 'linum' face inherit the background color from the > > surrounding text. > > It would also be very helpful to document this workaround. Once again, the above section says that specifying the face takes the specified attributes from that face, and merges them with faces from lower-priority sources in order to determine unspecified attributes. In this case, the background color is not specified by the customized 'linum' face, so Emacs takes it from the buffer text. I'm open to suggestions for how to make this more evident. In any case, I take it that you agree that what Emacs does is the only reasonable thing in this case, right?