From: zhang cc <ccsmile2008@outlook.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: How to let hl-line-mode ignore text with non-default background color?
Date: Tue, 9 Jan 2018 06:21:47 +0000 [thread overview]
Message-ID: <PS1PR0601MB1403E250CF031E9779456806A8100@PS1PR0601MB1403.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <83d12j7l0b.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]
On 9 Jan 2018, 11:46 AM +0800, Eli Zaretskii <eliz@gnu.org>, wrote:
From: zhang cc <ccsmile2008@outlook.com
Date: Tue, 9 Jan 2018 02:25:10 +0000
Text with face custom background color or with inverse-video be set.
These text usually is important ones like TODO in org-mode or matched words in search result. But
hl-line-mode makes them can’t be seen clearly which is annoying.
Please show an example of this. I don't see a problem with the
default face definitions, at least not with display of search matches.
(I've read the stack-overflow question, and I still am not sure what
is the problem, since hl-line's background is rather light, and should
be very different from any reasonable foreground.) Maybe you use some
theme that is a factor here, or maybe your face customizations are
involved.
IOW, please show a complete recipe for reproducing the problem (it is
also advisable to post that with "M-x report-emacs-bug RET", so the
issue is recorded by the Emacs issue tracker).
Thanks.
Yes, it is face related. And hl-line can dim good faces (often for highlight use).
1. Open emacs with “-Q” arg
2. In the scratch buffer, eval the following form:
(progn
(text-mode)
(hl-line-mode)
(defface test-face
'((((class color) (background light))
:foreground "darkseagreen2" :background "black")
(((class color) (background dark))
:foreground "darkolivegreen" :background "white")
(t :inverse-video t))
"test face")
(set-text-properties (point-min) (point-max) `(face test-face)))
3. Then move cursor across lines in buffer. Foreground color of text is the same as background color set by hl-line-mode, and text can’t be seen.
[-- Attachment #2: Type: text/html, Size: 2930 bytes --]
next prev parent reply other threads:[~2018-01-09 6:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 2:25 How to let hl-line-mode ignore text with non-default background color? zhang cc
2018-01-09 3:45 ` Eli Zaretskii
2018-01-09 6:21 ` zhang cc [this message]
2018-01-09 19:12 ` Eli Zaretskii
2018-01-10 9:23 ` zhang cc
2018-01-10 15:38 ` Eli Zaretskii
2018-01-11 0:29 ` zhang cc
[not found] <3d53b7ae-a4cf-4405-8669-706781bb4889@Spark>
2018-01-09 2:42 ` zhang cc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PS1PR0601MB1403E250CF031E9779456806A8100@PS1PR0601MB1403.apcprd06.prod.outlook.com \
--to=ccsmile2008@outlook.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.