From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: How can I make hl-line mode not override the color of rainbow-mode? Date: Fri, 27 Oct 2017 15:33:00 +0700 Message-ID: References: <87k1zhyivb.fsf@gmail.com> <5f96b32e-de79-4e0d-8ac1-d8c1c35ee8bc@default> <87vaj1z677.fsf@gmail.com> <86mv4dnxa2.fsf@zoho.com> <83r2tp6olw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1509093237 7075 195.159.176.226 (27 Oct 2017 08:33:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Oct 2017 08:33:57 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 27 10:33:53 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 1e805N-0000xA-Ti for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Oct 2017 10:33:50 +0200 Original-Received: from localhost ([::1]:56238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e805T-0006V3-9i for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Oct 2017 04:33:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e804z-0006Uk-EL for help-gnu-emacs@gnu.org; Fri, 27 Oct 2017 04:33:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e804y-000784-GA for help-gnu-emacs@gnu.org; Fri, 27 Oct 2017 04:33:25 -0400 Original-Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:47858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e804w-00074n-PN; Fri, 27 Oct 2017 04:33:22 -0400 Original-Received: by mail-oi0-x22a.google.com with SMTP id h200so9799973oib.4; Fri, 27 Oct 2017 01:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=64v6/wh1oxB5DseVUhElx9Opnu0H05bTziC4RwCkJ4s=; b=Ln6X7CMe8/zNgMRURxeweE1o7ZMIPFTJ5YUPYYmTuDRZHPBYsKr7gprdvEvsbDBMwE 0IgTjU2bXdAl3m/cNIRfnlooWb+pDTDK7VSEscLG+tzoqq4coYPaW3U/NWAnMkJmpd+m l07f9WDf+q6HC2k2FM6pbDsYNquxFKgAjQfw61an7Qy21/QuRZTsIjgsYEMmZfzZu/BI 3Rh/Srk03gb0uHdBOhbpEwsyxuHz/446HTXNu+iIOmUXshY5OpQ7lMH59jIIWTG992XF uOfxUwd1ejjbs+LJ+rpHgxyVAE7qar8d7FY8a2ogyJHGdRdYyujDWKHiV2mC4n6+Dglf Z94w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=64v6/wh1oxB5DseVUhElx9Opnu0H05bTziC4RwCkJ4s=; b=j3EK3KwhkNwi71DKXqEZeso8aaFqsL+FWwvrDdzeyhgJDZpf2b6mWRjaoDivxa2gcw GTD4tLeoTNYave9UkwKGJ37nWpi2IrbQXNEpyVzxM1CIvXRqe88sIyCBbzdu5RL4ZJar 6noAd0RSoVsLwzwgD/+ZBBro/AIBu10V9+6RM4zh0oFCrLIRERl6wDagByWBOue8ZXdO FCE2P3+xT09y+nwB+bvBLXz+c3EaERMcIyyp5TtYanvtDPitGEI3Mk436Qgv9bFH6df3 XxoHkY4GqalS751pbbKg/PA1Vwxej+OIwhFZCd1UnSciGGszoSNJym3dcq2gPgphHH/V npsA== X-Gm-Message-State: AMCzsaVlWb4PyiW1mDnTELcZ5nqOped1yWeIwRY+gnMfKG+O2MkvpyJT Z8dizgPWFzh+CmBV8z3l/4VtR8Y6ioGu5DXmUlNXkg== X-Google-Smtp-Source: ABhQp+Qvd7+UkTBDZgOMHLe8fClkRTFt5VBdtjqUX3cFFZWHa0KyfnmWSMKjJlSTprZRrclmXmTH8I8QB+S7Vho89Mc= X-Received: by 10.157.63.5 with SMTP id m5mr5185653otc.125.1509093201491; Fri, 27 Oct 2017 01:33:21 -0700 (PDT) Original-Received: by 10.74.118.21 with HTTP; Fri, 27 Oct 2017 01:33:00 -0700 (PDT) In-Reply-To: <83r2tp6olw.fsf@gnu.org> X-Google-Sender-Auth: pFrntJD5TFzXDaaUgv-VrJcwWX4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22a 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:114656 Archived-At: On Fri, Oct 27, 2017 at 2:23 PM, Eli Zaretskii wrote: >> (I wish there was a way to make overlays interact better with text >> properties. hl-line takes precedence over pretty much any background >> color highlighting, including but not limited to hi-lock, rainbow-mode >> and Magit branch and tag decorations. > > This could be alleviated by using less intrusive face attributes for > the hl-line face. For example, one could use underline, or > bold/slant, or box, or something else that doesn't override the > colors, while still making the current line stand out on display. The idea of hl-line is not to make the current line =E2=80=9Cstand out=E2= =80=9D as such. It is a delicate balance of several desirable properties: 1. The current line needs to be immediately noticeable. a. Even if it contains no characters or contains only whitespace. 2. The current line should not be too distracting. a. In particular, it must not cause glyphs shifting when point moves. 3. The current line is secondary to any characteristics of the text in the buffer. A very subtle change in background color (on the order of 8 gray levels out of 256) fits those criteria except 3. Bold, slant and underline fail #1a. Box fails #2a when the box line width is positive, and sometimes also when negative. (In an *Info* buffer, a negative box still causes shifting for me on Emacs 25.1.) If the box line width is negative and big enough that it gives the effect of text background, it also fails #3. >> The intuitive expectation, for hl-line, would be that it should >> override background color only if it comes directly or indirectly >> from the default face.) > > I think I disagree, but then I don't use hl-line in my routine usage, > so maybe my opinion isn't worth much. That=E2=80=99s why I=E2=80=99m offering my opinion, which I acquired throug= h 10 years of Emacs and a few years of other editors before that. (Of course I understand programming that behavior is technically difficult given the overall scheme of things. An overlay is just not a good enough fit for hl-line; an =E2=80=9Cunderlay=E2=80=9D would be more li= ke it.)