all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ikumi Keita <ikumi@ikumi.que.jp>
Cc: 43033@debbugs.gnu.org
Subject: bug#43033: 27.1; Two zero-width overlays with before- and after-string property
Date: Tue, 25 Aug 2020 09:50:34 +0300	[thread overview]
Message-ID: <83ft8b5idh.fsf@gnu.org> (raw)
In-Reply-To: <1377.1598333200@localhost> (message from Ikumi Keita on Tue, 25 Aug 2020 14:26:40 +0900)

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	other threads:[~2020-08-25  6:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25  5:26 bug#43033: 27.1; Two zero-width overlays with before- and after-string property Ikumi Keita
2020-08-25  6:50 ` Eli Zaretskii [this message]
2020-08-25  7:08   ` Ikumi Keita

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=83ft8b5idh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=43033@debbugs.gnu.org \
    --cc=ikumi@ikumi.que.jp \
    /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.