From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Inspecting behaviour of `make-overlay', is this expected?
Date: Sat, 24 Dec 2022 10:36:59 +0200 [thread overview]
Message-ID: <83cz895has.fsf@gnu.org> (raw)
In-Reply-To: <e7acbf03e75a0be2d0eb2989a5fce313.support1@rcdrun.com> (message from Jean Louis on Sat, 24 Dec 2022 10:52:47 +0300)
> Date: Sat, 24 Dec 2022 10:52:47 +0300
> From: Jean Louis <bugs@gnu.support>
>
> XXXXXXXXXX
> ^
> | position 0 in buffer
>
> (setq my-overlay (make-overlay 0 10))
> (get-buffer-window (overlay-buffer my-overlay))
> (overlay-put my-overlay 'display "Hello") then I get:
>
> HelloX
>
> instead of "Hello"
>
> Is this normal behavior?
Yes. The 10 part says that the overlay _ends_ before position 10.
This is standard Emacs behavior with text properties and overlays: END
means the first character NOT affected by the property/overlay.
next prev parent reply other threads:[~2022-12-24 8:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 7:52 Inspecting behaviour of `make-overlay', is this expected? Jean Louis
2022-12-24 8:36 ` Eli Zaretskii [this message]
2022-12-24 16:32 ` Jean Louis
2022-12-25 8:03 ` Marcin Borkowski
2022-12-25 11:10 ` Jean Louis
2022-12-24 16:30 ` [External] : " Drew Adams
2022-12-24 16:34 ` Jean Louis
2022-12-24 16:39 ` Drew Adams
2022-12-25 6:44 ` tomas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83cz895has.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).