From: Amos Bird <amosbird@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How can I remove effects of text properties in 'before-string
Date: Mon, 23 Oct 2017 02:08:40 +0800 [thread overview]
Message-ID: <87o9oz9hsn.fsf@gmail.com> (raw)
In-Reply-To: <834lqrayti.fsf@gnu.org>
Hi, thanks for the code. It works! However, I tried to explicited
set face to
'((t (:foreground "magenta" :weight bold :inherit default))
which doesn't. Why?
regards,
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Amos Bird <amosbird@gmail.com>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Mon, 23 Oct 2017 01:07:04 +0800
>>
>> Hi, could you show the elisp code that resolves this? I don't
>> quite understand how to give a distinct face.
>
> Here, this simple variation of your original recipe will display
> the
> string in the margin using the 'default' face:
>
> (set-window-margins (get-buffer-window) 20 0)
> (setq ovstring (propertize "Hi, there!" 'face 'default))
> <<<<<<<<<<<<<<<
> (overlay-put (make-overlay (point) (point)) 'before-string
> (propertize "."
> 'display
> `((margin left-margin) ,ovstring)))
> (hl-line-mode)
>
> The line marked with "<<<<<" is the main part of the solution.
--
Amos Bird
amosbird@gmail.com
next prev parent reply other threads:[~2017-10-22 18:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-22 7:25 How can I remove effects of text properties in 'before-string 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 [this message]
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>
[not found] ` <<838tg3b27v.fsf@gnu.org>
2017-10-22 16:33 ` Drew Adams
2017-10-22 16:50 ` Eli Zaretskii
[not found] ` <<837evnazze.fsf@gnu.org>
2017-10-22 17:32 ` Drew Adams
2017-10-27 14:44 ` Eli Zaretskii
[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=87o9oz9hsn.fsf@gmail.com \
--to=amosbird@gmail.com \
--cc=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.