all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: 40821@debbugs.gnu.org
Subject: bug#40821: Margin strings are displayed in reverse order of overlay priority (low-priority specs hide high-priority ones)
Date: Wed, 13 May 2020 19:25:15 +0300	[thread overview]
Message-ID: <83zhab6bv8.fsf@gnu.org> (raw)
In-Reply-To: <7749d51d-79ae-e687-0861-3a81a0b4bc0e@gmail.com> (message from Clément Pit-Claudel on Wed, 13 May 2020 11:58:26 -0400)

> Cc: 40821@debbugs.gnu.org
> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
> Date: Wed, 13 May 2020 11:58:26 -0400
> 
> (with-current-buffer (get-buffer-create "overlay props")
>   (erase-buffer)
>   (delete-all-overlays)
>   (setq-local left-margin-width 5)
>   (save-excursion (insert "test\ntest\n"))
>   (let ((ov1 (make-overlay (point-min) (point-max)))
>         (ov2 (make-overlay (point-min) (point-at-eol))))
>     (overlay-put
>      ov1
>      'before-string
>      #("!" 0 1 (display
>                 ((margin left-margin) "c"))))
>     (overlay-put
>      ov2
>      'before-string
>      #("!" 0 1 (display
>                 ((margin left-margin) "3")))))
>   (display-buffer (current-buffer)))
> 
> In this example, moving the point back and forth between point-min and 1+ point-min causes the margins to display alternatively "c3" and "3c".
> Is this a bug?

It is not a bug.  You haven't defined any priorities, so the sorting
of the overlay strings is arbitrary, and the display engine processes
them in the sorted order.  IOW, this is unspecified behavior in
action.

(I can explain why the order changes technically, but it hardly
matters for the more general question.)





      reply	other threads:[~2020-05-13 16:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 15:56 bug#40821: Margin strings are displayed in reverse order of overlay priority (low-priority specs hide high-priority ones) Clément Pit-Claudel
2020-04-25  7:58 ` Eli Zaretskii
2020-04-25 13:01   ` Clément Pit-Claudel
2020-04-25 14:04     ` Eli Zaretskii
2020-04-25 16:51       ` Clément Pit-Claudel
2020-04-25 17:08         ` Eli Zaretskii
2020-04-25 17:21           ` Clément Pit-Claudel
2020-04-25 17:36             ` Eli Zaretskii
2020-04-25 19:29               ` Dmitry Gutov
2020-04-25 20:50               ` Clément Pit-Claudel
2020-05-13 15:58   ` Clément Pit-Claudel
2020-05-13 16:25     ` Eli Zaretskii [this message]

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=83zhab6bv8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=40821@debbugs.gnu.org \
    --cc=cpitclaudel@gmail.com \
    /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.