bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43033: 27.1; Two zero-width overlays with before- and after-string p


From: Eli Zaretskii
Subject: bug#43033: 27.1; Two zero-width overlays with before- and after-string property
Date: Tue, 25 Aug 2020 09:50:34 +0300

tags 43033 notabug
thanks

> From: Ikumi Keita <ikumi@ikumi.que.jp>
> Date: Tue, 25 Aug 2020 14:26:40 +0900
> 
> (setq ov1 (make-overlay (point-max) (point-max)))
> (setq ov2 (make-overlay (point-max) (point-max)))
> (overlay-put ov1 'after-string "AFTER")
> (overlay-put ov2 'before-string "before")
> --------------------------------------------------
> 2. emacs -Q -l /tmp/foo.el
> 3. Expected result: *scrach* buffer displays "beforeAFTER" in it
>    Actual result: *scrach* buffer displays "AFTERbefore" in it

This is the expected (albeit somewhat counter-intuitive) behavior:
Emacs always sorts after-strings so that they come in front of
before-strings, except if they are from the same overlay.  This
behavior remained unchanged since Emacs 21.1.

> [How this behavior affects my usage of overlay]
> When the minibuffer has a zero-width overlay at the EOB with
> before-string property, `set-minibuffer-message' displays that string
> after, not before, the echo area message shown by that function.

This is by design: we want the minibuffer message to be as visible as
possible, so other overlays are pushed to the right (where they could
be hidden if the screen space is insufficient).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]