From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to let hl-line-mode ignore text with non-default background color? Date: Wed, 10 Jan 2018 17:38:02 +0200 Message-ID: <83d12h67xh.fsf@gnu.org> References: <83d12j7l0b.fsf@gnu.org> <83tvvu6e4d.fsf@gnu.org> 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 1515598586 27015 195.159.176.226 (10 Jan 2018 15:36:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 Jan 2018 15:36:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: zhang cc Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 10 16:36:21 2018 Return-path: Envelope-to: ged-emacs-devel@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 1eZIQM-0006bl-N5 for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 16:36:18 +0100 Original-Received: from localhost ([::1]:49041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZISM-0007kp-8k for ged-emacs-devel@m.gmane.org; Wed, 10 Jan 2018 10:38:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZISB-0007jG-Hr for emacs-devel@gnu.org; Wed, 10 Jan 2018 10:38:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZIS8-0005vQ-Eo for emacs-devel@gnu.org; Wed, 10 Jan 2018 10:38:11 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZIS8-0005vF-BP; Wed, 10 Jan 2018 10:38:08 -0500 Original-Received: from [176.228.60.248] (port=2180 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eZIS7-0001L1-Nt; Wed, 10 Jan 2018 10:38:08 -0500 In-reply-to: (message from zhang cc on Wed, 10 Jan 2018 09:23:46 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221794 Archived-At: > From: zhang cc > CC: "emacs-devel@gnu.org" > Date: Wed, 10 Jan 2018 09:23:46 +0000 > > On 10 Jan 2018, 3:12 AM +0800, Eli Zaretskii , wrote: > > If you must set the foreground of the text the same as the background > of the hl-line face, then customize the hl-line face to define the > "distant foreground" color for it. E.g., I defined the "distant > foreground" to be black, and the problem went away. > > Tried with some colors. It didn’t always work well. For example, in the following picture, the left is the test > code, the right is the details of the face hl-line, the highlighted one line in the left window is the result. That's because you've chosen the distant foreground poorly. Look, you can always shoot yourself in the foot if you intentionally arrange your colors to produce bad contrast. That doesn't prove anything, certainly not that there's a bug or a missing feature. If you play with colors, you need to choose them carefully, that's all.