From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How can I remove effects of text properties in 'before-string
Date: Sun, 22 Oct 2017 19:50:29 +0300 [thread overview]
Message-ID: <837evnazze.fsf@gnu.org> (raw)
In-Reply-To: <c67918fc-4d01-4b11-a42b-3b29522d46a1@default> (message from Drew Adams on Sun, 22 Oct 2017 09:33:08 -0700 (PDT))
> Date: Sun, 22 Oct 2017 09:33:08 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
>
> > > The string "Hi there!" is also highlighted. How can I disable
> > > that?
> >
> > Give the string a distinct face.
>
> Why doesn't it use the `default' face? If no `face'
> property is given to the string, why would the effective
> face be something different from `default'?
That's the general way Emacs works: an overlay string which wasn't
specified a face uses the face of the "underlying" text. You will see
the same if the overlay string is displayed in the text area, and
displaying it in the margins doesn't change this basic fact.
Personally, I think nothing else makes more sense, but that's me.
> Where in the doc do we say that this should use a face
> that is used in an overlay placed on some buffer positions?
The hl-line overlay produces a face for buffer text, and the
before-string is displayed with the same face.
> Is this behavior documented? I couldn't find anything
> about it, but it might well be there somewhere. I looked
> in the doc about overlays and the doc about the margin,
> but perhaps it is there and I overlooked or misread it.
It's indirectly documented in "Displaying Faces".
> Or is this perhaps a bug?
Not a bug: the code does this on purpose, and even has comments that
explicitly describe this. Emacs worked like that since v21.1.
next prev parent reply other threads:[~2017-10-22 16:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<87tvyrabkk.fsf@gmail.com>
[not found] ` <<838tg3b27v.fsf@gnu.org>
2017-10-22 16:33 ` How can I remove effects of text properties in 'before-string Drew Adams
2017-10-22 16:50 ` Eli Zaretskii [this message]
[not found] ` <<837evnazze.fsf@gnu.org>
2017-10-22 17:32 ` Drew Adams
2017-10-27 14:44 ` Eli Zaretskii
2017-10-22 7:25 Amos Bird
2017-10-22 7:43 ` Amos Bird
2017-10-22 16:00 ` Emanuel Berg
2017-10-22 17:07 ` Amos Bird
2017-10-22 16:02 ` Eli Zaretskii
2017-10-22 17:07 ` Amos Bird
2017-10-22 17:15 ` Eli Zaretskii
2017-10-22 18:08 ` Amos Bird
2017-10-22 18:24 ` Eli Zaretskii
2017-10-22 19:12 ` Amos Bird
2017-10-22 19:34 ` Eli Zaretskii
2017-10-23 12:57 ` Stefan Monnier
[not found] <<<87tvyrabkk.fsf@gmail.com>
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=837evnazze.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@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.